mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 13:31:02 +08:00
3decba7a16
"protobuf_c_default_allocator" is the last bit of global data in libprotobuf-c, and it can be hidden with some relatively easy (though API/ABI-breaking) changes to ProtobufCBufferSimple. all exported functions that take a ProtobufCAllocator either use the provided allocator (if non-NULL), or switch to the default allocator (if NULL). there are now two relatively unambiguous choices when a ProtobufCAllocator is required by an exported function: 1) use NULL. the vast majority of callers should pick this option. 2) implement your own allocation functions, and enclose these in a ProtobufCAllocator struct. in previous versions of protobuf-c there were two other possibilities: 3) maybe use &protobuf_c_system_allocator? 4) maybe use &protobuf_c_default_allocator? this was relatively confusing, and by removing these latter two options we can avoid having global library state.
24 lines
806 B
Plaintext
24 lines
806 B
Plaintext
LIBPROTOBUF_C_1.0.0 {
|
|
global:
|
|
protobuf_c_buffer_simple_append;
|
|
protobuf_c_enum_descriptor_get_value;
|
|
protobuf_c_enum_descriptor_get_value_by_name;
|
|
protobuf_c_message_check;
|
|
protobuf_c_message_descriptor_get_field;
|
|
protobuf_c_message_descriptor_get_field_by_name;
|
|
protobuf_c_message_free_unpacked;
|
|
protobuf_c_message_get_packed_size;
|
|
protobuf_c_message_init;
|
|
protobuf_c_message_pack;
|
|
protobuf_c_message_pack_to_buffer;
|
|
protobuf_c_message_unpack;
|
|
protobuf_c_service_descriptor_get_method_by_name;
|
|
protobuf_c_service_destroy;
|
|
protobuf_c_service_generated_init;
|
|
protobuf_c_service_invoke_internal;
|
|
protobuf_c_version;
|
|
protobuf_c_version_number;
|
|
local:
|
|
*;
|
|
};
|