updates to work with latest protobuf

git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@63 00440858-1255-0410-a3e6-75ea37f81c3a
This commit is contained in:
lahiker42 2008-09-09 18:18:28 +00:00
parent 67f08bfda9
commit f3ed0fa1c9
5 changed files with 13 additions and 7 deletions

View File

@ -2,3 +2,4 @@
0.1: Lots of test code (and bug fixes).
0.2:
0.3: Minor pedantic concerns about generated code.
0.4: Update to work with protobuf 2.0.1.

8
TODO
View File

@ -3,8 +3,14 @@
----------------------
- provide example rpc
- at least include extensions in Descriptor
- proper support for extensions
- slot for ranges in descriptor
- parent in descriptor
- "extends" is implemented as c-style derivation
- cast macros?
- implement default values for most primitive types,
but not strings, bytes, or messages.
- ensure enums are int-size
--------------------
--- NEEDED TESTS ---
@ -19,7 +25,6 @@
--- DOCUMENTATION ---
---------------------
Document:
- __INIT macro; explain current lifetime policy
- services
- default value handling
- note that the plan is to set the value to the default
@ -39,7 +44,6 @@ Document:
- support Group (whatever it is)
- almost no code generator options are obeyed
- generate Init functions / handle default values
- proper support for extensions (not sure i get what's needed)
------------------------------------
--- EXTREMELY LOW PRIORITY STUFF ---

View File

@ -1,10 +1,11 @@
AC_INIT(src/google/protobuf-c/protobuf-c.h)
PROTOBUF_C_VERSION=0.3
PROTOBUF_C_VERSION=0.4
AM_INIT_AUTOMAKE(protobuf-c, $PROTOBUF_C_VERSION)
PACKAGE=protobuf-c
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_PATH_PROG(PROTOC, protoc)
AC_OUTPUT( Makefile src/Makefile src/test/Makefile )

View File

@ -21,9 +21,9 @@ generated-code/test.pb-c.c generated-code/test.pb-c.h: ../protoc-c $(srcdir)/tes
generated-code/test-full.pb-c.c generated-code/test-full.pb-c.h: ../protoc-c $(srcdir)/test-full.proto
mkdir -p generated-code
../protoc-c -I$(srcdir) --c_out=generated-code $(srcdir)/test-full.proto
generated-code/test-full.pb.cc generated-code/test-full.pb.h: $(srcdir)/test-full.proto
generated-code/test-full.pb.cc generated-code/test-full.pb.h: $(srcdir)/test-full.proto @PROTOC@
mkdir -p generated-code
protoc -I$(srcdir) --cpp_out=generated-code $(srcdir)/test-full.proto
@PROTOC@ -I$(srcdir) --cpp_out=generated-code $(srcdir)/test-full.proto
generated-code/test-full-cxx-output.inc: cxx-generate-packed-data
./cxx-generate-packed-data > generated-code/test-full-cxx-output.inc

View File

@ -755,8 +755,8 @@ static void dump_test_repeated_SubMess (void)
static void dump_test_unknown_fields (void)
{
EmptyMess mess;
google::protobuf::Message::Reflection *reflection = mess.GetReflection();
google::protobuf::UnknownFieldSet *fs = reflection->MutableUnknownFields();
const google::protobuf::Message::Reflection *reflection = mess.GetReflection();
google::protobuf::UnknownFieldSet *fs = reflection->MutableUnknownFields(&mess);
google::protobuf::UnknownField *f;
f = fs->AddField(5454);
f->add_varint(255);