[protobuf] message member case problem

2012-05-16 Thread secondsquare
I wrote a message like this
message head
{
required fixed32 msgSize = 1;
}

After generating cpp files, the member becomes msgsize.

Big ā€˜Sā€™ is changed to little 's'.

I've been heard about the filename case sensitive difference between
os,
but never heard name of class member case sensitive difference between
os.

Is it designed to ? Or other things?

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



Re: [protobuf] message member case problem

2012-05-16 Thread Evan Jones
On May 16, 2012, at 5:02 , secondsquare wrote:
 After generating cpp files, the member becomes msgsize.
 
 Big ā€˜Sā€™ is changed to little 's'.

This is by design. Protocol buffers follows Google's style guide where C++ 
names_use_underscores while Java names useCamelCase. Protobuf will generate the 
appropriate names:

https://developers.google.com/protocol-buffers/docs/style


In other words, the recommendation is that you should use _ to separate works 
in your .proto.

Evan

--
http://evanjones.ca/

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] strange thing while using libprotobuf in apache modules

2012-05-16 Thread Sky
Hi,
I made a message, named RequestModel and when I declare pointer of
RequestModel like :
LOG(MSG_BEFORE);
RequestModel  *mmodel;
..
My module get loaded by apache  and I get the MSG_BEFORE in my apache
log.
But when I new my object, apache does'nt even call my function
without any error or segmentation fault :

LOG(MSG_BEFORE);
RequestModel  *mmodel=new RequestModel() ;
..
this way I don't get MSG_BEFORE in apache error.log.
can some one guess what's going on?

Regards,
Sky

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Apache Module + PB

2012-05-16 Thread Hassan Monfared
modcplusplus is right solution for voiding such headaches.
I've no problem with modcpluplus + ( C++ Module ) + any c++ shared objects 
except PB.
I explained my problem recently in this group.
Cheers,
SKY

On Thursday, November 19, 2009 5:20:28 PM UTC+3:30, Mauro wrote:

 Haha, Jason was right! 

 I might be getting older... Like I always say. If you write some code, 
 compile it with the right compiler. 

 I'll do some research. 

 Cheers! 

 Mauro. 

 On Nov 18, 4:53 pm, josh rotenberg joshrotenb...@gmail.com wrote: 
  I've never done Apache module stuff in C++ (C only) but I'd guess 
  thats a good place to look first. I believe there are a few libraries 
  out there that take some of the pain out of doing Apache modules in 
  C++, so you might google around for those. 
  
  Josh 
  
  
  
  On Wed, Nov 18, 2009 at 7:56 AM, Mauro mau...@gmail.com wrote: 
   Hi, 
  
   I'm running Mac OS Tiger (powerpc-apple-darwin8-gcc-4.0.0) and new to 
 C 
   ++ and PB. 
  
   I'm developing an Apache module that should generate a response for a 
   given request, both encoded with Protocol Buffers. 
  
   I wrote an example.proto and compiled it into example.pb.h using 
   protoc. Then I included this example.pb.h in my mod_example.c file. 
  
   The matter comes when attemping to make: 
  
   make check 
   source='mod_example.c' object='mod_example.lo' libtool=yes \ 
   depfile='.deps/mod_example.Plo' tmpdepfile='.deps/mod_example.TPlo' \ 
   depmode=gcc3 /bin/sh ./depcomp \ 
   /bin/sh ./libtool --mode=compile gcc -DPACKAGE_NAME=\\ - 
   DPACKAGE_TARNAME=\\ -DPACKAGE_VERSION=\\ -DPACKAGE_STRING=\\ - 
   DPACKAGE_BUGREPORT=\\ -DPACKAGE=\mod_example\ -DVERSION=\1.0\ - 
   DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 - 
   DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 - 
   DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 - 
   DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1  -I. -I. -I/usr/local/apache2/ 
   include -I/usr/include -I/usr/local/include -I/usr/include/gcc/darwin/ 
   4.0/c++ -I/usr/include/gcc/darwin/4.0/c++/powerpc-apple-darwin8-g 
 - 
   O2 -c -o mod_example.lo `test -f 'mod_example.c' || echo 
   './'`mod_example.c 
gcc -DPACKAGE_NAME=\\ -DPACKAGE_TARNAME=\\ -DPACKAGE_VERSION=\\ 
   -DPACKAGE_STRING=\\ -DPACKAGE_BUGREPORT=\\ -DPACKAGE=\mod_example 
   \ -DVERSION=\1.0\ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 - 
   DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 - 
   DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 - 
   DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -I/usr/ 
   local/apache2/include -I/usr/include -I/usr/local/include -I/usr/ 
   include/gcc/darwin/4.0/c++ -I/usr/include/gcc/darwin/4.0/c++/powerpc- 
   apple-darwin8 -g -O2 -c mod_example.c -MT mod_example.lo -MD -MP - 
   MF .deps/mod_example.TPlo  -fno-common -DPIC -o .libs/mod_example.o 
   In file included from /usr/include/gcc/darwin/4.0/c++/string:44, 
   from protocols/realtime-bidding.pb.h:6, 
   from mod_example.c:5: 
   
 /usr/include/gcc/darwin/4.0/c++/powerpc-apple-darwin8/bits/c++config.h: 
   64: error: parse error before '__gnu_debug_def' 
   
 /usr/include/gcc/darwin/4.0/c++/powerpc-apple-darwin8/bits/c++config.h: 
   64: error: syntax error before '{' token 
   
 /usr/include/gcc/darwin/4.0/c++/powerpc-apple-darwin8/bits/c++config.h: 
   67: error: syntax error before '{' token 
  
   ( ... a lot of similar errors in many files ... ) 
  
   /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:499: error: 
   syntax error before ':' token 
   /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:500: error: 
   syntax error before ':' token 
   /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:501: error: 
   syntax error before ':' token 
   /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:502: error: 
   syntax error before ':' token 
   /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:503: error: 
   syntax error before ':' token 
   /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:504: error: 
   syntax error before ':' token 
   /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h: In function 
   '_M_add_reference': 
   /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:507: error: 
   parse error before 'throw' 
   /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:516: confused by 
   earlier errors, bailing out 
   make: *** [mod_example.lo] Error 1 
  
   I tried to change the include paths from /usr/include/gcc/darwin/4.0 
   to /usr/include/gcc/darwin/3.1 and some other versions available in my 
   system with same result. 
  
   I would really appreciate your help. 
  
   Cheers, 
  
   Mauro. 
  
   -- 
  
   You received this message because you are subscribed to the Google 
 Groups Protocol Buffers group. 
   To post to this group, send email to protobuf@googlegroups.com. 
   To unsubscribe from this group, send email to 
 protobuf+unsubscr...@googlegroups.com. 
   For more options, visit this 

[protobuf] Re: Protocol buffers for COBOL

2012-05-16 Thread Bruce
Not sure if it is of any interest, I have the code needed to copy 
Protocol-Buffers to / from cobol in my projects

RecordEditor (http://record-editor.sourceforge.net/)
Protocol Buffers Editor (http://code.google.com/p/protobufeditor/)

It would be a case of putting code from the 2 projects together.

The RecordEditor has a copy Utility that can be run on line and in batch; 
The Protocol-Buffer-Editor wraps protocol bufffers messages in a 
RecordEditor wrapper.

Note: The 2 projects are written in java.



On Sunday, May 6, 2012 4:55:45 PM UTC+10, Fady wrote:

 I started a new open source project called protobuf-cobol here: 
 http://code.google.com/p/protobuf-cobol/. 

 The rationale behind the project is developed here: 
 http://legstar.blogspot.fr/2012/05/protocol-buffers-for-mainframe.html. 

 Although considerably outdated, COBOL is still widely used around the 
 world so hopefully this will become one more Programming Language 
 entry in this list: 
 http://code.google.com/p/protobuf/wiki/ThirdPartyAddOns. 

 Enjoy 

 Fady


On Sunday, May 6, 2012 4:55:45 PM UTC+10, Fady wrote:

 I started a new open source project called protobuf-cobol here: 
 http://code.google.com/p/protobuf-cobol/. 

 The rationale behind the project is developed here: 
 http://legstar.blogspot.fr/2012/05/protocol-buffers-for-mainframe.html. 

 Although considerably outdated, COBOL is still widely used around the 
 world so hopefully this will become one more Programming Language 
 entry in this list: 
 http://code.google.com/p/protobuf/wiki/ThirdPartyAddOns. 

 Enjoy 

 Fady

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/protobuf/-/QRFtRpM0g4AJ.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.