Age | Commit message (Collapse) | Author | Files | Lines |
|
This makes the internal logic much simpler, and also keeps the datatypes
more similar between STATIC/POINTER cases. It will still be a bit cumbersome
to use because of variable length array member. Macros PB_BYTES_ARRAY_T(n) and
PB_BYTES_ARRAY_T_ALLOCSIZE(n) have been added to make life a bit easier.
This has the drawback that it is no longer as easy to use externally allocated
byte array as input for bytes field in pointer mode. However, this is still
easy to do using callbacks, so it shouldn't be a large issue.
|
|
|
|
|
|
|
|
Update issue 96
Status: FixedInGit
|
|
|
|
|
|
Allocation decision is now made before the field data type is decided.
This way the data type decisions can more cleanly account for the allocation
type, i.e. FT_DEFAULT logic etc.
Added pb_bytes_ptr_t for pointer-allocated bytes-fields. There is no point
generating separate structs for these, as they would all be of the same type.
|
|
|
|
Apparently int32 values that are negative must be cast into int64 first
before being encoded. Because uint32 still needs to be cast to uint64,
the cases for int32 and uint32 had to be separated.
Update issue 97
Status: FixedInGit
|
|
|
|
|
|
Use these in pb_field_t definition to clean up some #ifs, and also
to prepare for solving issue #82.
|
|
|
|
|
|
|
|
Requires re-generation of files generated with dev_get_rid_of_ternary_operator.
|
|
Some compilers where unable to detect that the ternary operator
can be evaluated at the compile time. This commit does the evaluation
on the Python side, which should fix the problem.
The new .pb.c files are generated using PB_FIELD2() macro. The old
PB_FIELD() macro remains, so that previously generated files keep
working.
|
|
This allows building the tests easily on Visual C++ in C mode.
Also add checks to pb.h that the defined integer types are of
the proper sizes. This may prevent some difficult to debug problems
later..
|
|
|
|
|
|
|
|
|
|
yet)
|
|
Update issue 76
Status: FixedInGit
|
|
|
|
|
|
|
|
NOTE: This change breaks backwards-compatibility by default.
If you have old callback functions, you can define PB_OLD_CALLBACK_STYLE
to retain the old behaviour.
If you want to convert your old callbacks to new signature, you need
to do the following:
1) Change decode callback argument to void **arg
and encode callback argument to void * const *arg.
2) Change any reference to arg into *arg.
The rationale for making the new behaviour the default is that it
simplifies the common case of "allocate some memory in decode callback".
Update issue 69
Status: FixedInGit
|
|
Update issue 67
Status: FixedInGit
|
|
Update issue 66
Status: FixedInGit
|
|
This allows replacing the C99 standard include file names with
a single system-specific file. It should provide all the necessary
system functions (typedefs, memset, memcpy, strlen).
Update issue 62
Status: FixedInGit
|
|
|
|
|
|
Also clean up the logic so that it is easier to implement more
allocation types in the future.
Update issue 53
Status: FixedInGit
|
|
This is a more logical name in parallel with PB_HTYPE_REQUIRED and PB_HTYPE_OPTIONAL.
Warning: This breaks backwards-compatibility of generated .pb.c files.
You will have to regenerate the files and recompile.
|
|
This has the following advantages:
1) Easier to modify pb_field_t encoding
2) Simpler generator logic
3) Tidier looking, easier to read .pb.c files
Update issue 58
Status: FixedInGit
|
|
See issue #57.
|
|
|
|
|
|
|
|
|
|
|
|
The __COUNTER__ macro (used for generating unique names) is at least supported
by gcc, clang and Visual Studio. With this change test_compiles.c is
compilable, since no more typedefs are redefined.
Compilers/Preprocessors not supporting __COUNTER__ error's are still possible
which are hopfully handled by the usage of __LINE__ in most sittuations.
Added unit test for the problem.
|
|
|
|
|
|
tools/set_version.sh is used to update the values.
Update issue 36
Status: FixedInGit
|
|
Update issue 39
Status: FixedInGit
|
|
This should help avoid issue 33 in the future.
|
|
Compile the generated files with the same extra-strict
settings as the core, in order to detect problems in tests.
Update issue 32
Status: FixedInGit
|