Fixed a bunch of bugs related to callback fields.

Most importantly, callback fields in submessages were being overwritten with garbage, causing segfaults.

Additionally, converted PB_LTYPE_FIXED to PB_LTYPE_FIXED32 and PB_LTYPE_FIXED64. This makes the interface
a bit easier to use, and in addition runs faster.


git-svn-id: https://svn.kapsi.fi/jpa/nanopb@975 e3a754e5-d11d-0410-8d38-ebb782a927b9
This commit is contained in:
Petteri Aimonen
2011-09-13 16:14:08 +00:00
parent d4abb63c05
commit fcfc99f766
13 changed files with 274 additions and 115 deletions

View File

@@ -3,7 +3,7 @@ LDFLAGS=--coverage
DEPS=../pb_decode.h ../pb_encode.h ../pb.h person.pb.h callbacks.pb.h unittests.h unittestproto.pb.h
TESTS=test_decode1 test_encode1 decode_unittests encode_unittests
all: $(TESTS) run_unittests breakpoints
all: breakpoints $(TESTS) run_unittests
clean:
rm -f $(TESTS) person.pb* *.o *.gcda *.gcno
@@ -27,7 +27,7 @@ encode_unittests: encode_unittests.o pb_encode.o unittestproto.pb.o
%.pb: %.proto
protoc -I. -I../generator -I/usr/include -o$@ $<
%.pb.c %.pb.h: %.pb
%.pb.c %.pb.h: %.pb ../generator/nanopb_generator.py
python ../generator/nanopb_generator.py $<
breakpoints: ../*.c *.c