Re: wxWidgets 2.9 build

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: wxWidgets 2.9 build
Date: 2011-02-01 10:21:16
Message-ID: AANLkTiknuDTW69upN6nC=e=OUsMUvea=wpJz7u=kB30T@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, Feb 1, 2011 at 12:26 AM, Peter Geoghegan
<peter(dot)geoghegan86(at)gmail(dot)com> wrote:
> On 31 January 2011 20:27, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>> I tried it on VC++ and it didn't complain. Didn't test gcc though.
>
> Can you produce a test case? I wasn't aware that it is possible to use
> the preprocessor to define C++ member function macros.

I was suggesting to use it instead of the ugly cast, not to define a
member function - eg.

diff --git a/pgadmin/pgAdmin3.cpp b/pgadmin/pgAdmin3.cpp
index 603c0fd..1b7105f 100644
--- a/pgadmin/pgAdmin3.cpp
+++ b/pgadmin/pgAdmin3.cpp
@@ -311,10 +311,11 @@ bool pgAdmin3::OnInit()
// Setup logging
InitLogger();

+#define cstr(x) ((const wxChar *)x)
wxString msg;
msg << wxT("# ") << appearanceFactory->GetLongAppName() <<
wxT(" Version ") << VERSION_STR << wxT(" Startup");
wxLogInfo(wxT("##############################################################"));
- wxLogInfo(wxT("%s"), msg.c_str());
+ wxLogInfo(wxT("%s"), cstr(msg));
wxLogInfo(wxT("##############################################################"));

#ifdef SSL

(which works fine on GCC too it seems).

>> OK - please send the updated patch and I'll test it again.
>
> Will do.

Thanks.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2011-02-01 15:24:31 Re: wxWidgets 2.9 build
Previous Message Nikhil S 2011-02-01 09:56:41 pgAdmin III: synonym support for EDBAS functions/procedures