Re: trouble with NewCallback (C++)

2009-08-31 Thread srlindemann
I was messing around in Visual Studio and tried this modification: google::protobuf::Closure* closure = google::protobuf::NewCallbackClosureTest,const DummyResponse*(ct, ClosureTest::MethodWithArg, dr); and it worked. Is explicitly specifying the template parameters the preferred solution? On

Re: trouble with NewCallback (C++)

2009-08-31 Thread Kenton Varda
The problem is that the parameter binding that you are providing has type DummyResponse* but the method you are trying to bind takes const DummyResponse*. Even though the former is implicitly convertible to the latter, the compiler will not consider this when selecting a template overload. The

Re: proto with java c++ python

2009-08-31 Thread Kenton Varda
C++ Protocol Buffers use UTF-8 for all text encoding, regardless of platform. If you want to use some other encoding in your code, you will have to manually convert between that and UTF-8 when interacting with Protocol Buffers. In Java and Python everything is taken care of automatically, since

Re: trouble with NewCallback (C++)

2009-08-31 Thread Steve Lindemann
That makes perfect sense---thanks. On Mon, Aug 31, 2009 at 12:36 PM, Kenton Varda ken...@google.com wrote: The problem is that the parameter binding that you are providing has type DummyResponse* but the method you are trying to bind takes const DummyResponse*. Even though the former is

Re: Example produces error.

2009-08-31 Thread Kenton Varda
Thanks for fixing the docs, Henner. On Sat, Aug 29, 2009 at 6:59 PM, Henner Zeller h.zel...@acm.org wrote: And yeah, documentation needs to be fixed. On Aug 28, 2009 1:35 PM, Omnifarious omnifari...@gmail.com wrote: An example from

warnings compiling generated code on Snow Leopard

2009-08-31 Thread Joshua Haberman
I just installed Snow Leopard, which ships with: $ gcc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY

Re: warnings compiling generated code on Snow Leopard

2009-08-31 Thread Kenton Varda
What compiler flags are you using? Since you were able to compile libprotobuf itself, I assume you have turned on additional warnings for your own project? On Mon, Aug 31, 2009 at 3:26 PM, Joshua Haberman jhaber...@gmail.comwrote: I just installed Snow Leopard, which ships with: $ gcc

Re: warnings compiling generated code on Snow Leopard

2009-08-31 Thread Joshua Haberman
Good point, this was with -Wextra (which I had forgotten I compile with). I can understand if you're not interested in accommodating this. It is strange that -Wextra warns about this for this particular gcc version, but not others that I've tried. On Aug 31, 4:49 pm, Kenton Varda

Re: warnings compiling generated code on Snow Leopard

2009-08-31 Thread Joshua Haberman
On Aug 31, 5:17 pm, Michael Poole mdpo...@troilus.org wrote: Joshua  Haberman writes: The protobuf library compiled and installed fine, but the generated classes threw warnings (and since I was compiling with -Werror, failed to compile).  The warning was: