Skip to content

Commit

Permalink
post-rebase generated code update
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Jul 15, 2020
1 parent 11c081a commit 6784dd6
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ static bool ChangeUid_to_flatbuffer(flatcc_builder_t* B, const ChangeUid* object

/// Read an object from a valid FlatBuffer.
/// If the read object contains vectors or strings, those are allocated on heap and must be freed after use by calling ChangeUid_free_pointers().
/// Thus, when calling this function multiple times on the same object, ensure to call ChangeUid_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// Thus, when calling this function multiple times on the same object, ensure to call ChangeUid_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// allocated by this function will also be freed before returning, allowing you to retry.
static bool ChangeUid_from_flatbuffer(const void* data, size_t size, ChangeUid* out_object);

/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// The object must be freed after use by calling ChangeUid_free();
static ChangeUid* ChangeUid_new_from_flatbuffer(const void* data, size_t size);

/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
static void ChangeUid_free_pointers(ChangeUid* object);

/// Free ChangeUid* object pointer and all its property pointers (vectors and strings).
Expand Down Expand Up @@ -140,7 +140,7 @@ static void ChangeUid_free(ChangeUid* object) {
}

/// Insert or update the given object in the database.
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// was already specified (non-zero), it will remain unchanged.
/// @return object ID from the object param (see object param docs) or a zero on error. If a zero was returned, you can
/// check obx_last_error_*() to get the error details. In an unlikely event that those functions return no error
Expand Down
10 changes: 5 additions & 5 deletions test/comparison/testdata/fbs/rename-property/c/B.obx.h.expected
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ static bool EntityB_to_flatbuffer(flatcc_builder_t* B, const EntityB* object, vo

/// Read an object from a valid FlatBuffer.
/// If the read object contains vectors or strings, those are allocated on heap and must be freed after use by calling EntityB_free_pointers().
/// Thus, when calling this function multiple times on the same object, ensure to call EntityB_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// Thus, when calling this function multiple times on the same object, ensure to call EntityB_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// allocated by this function will also be freed before returning, allowing you to retry.
static bool EntityB_from_flatbuffer(const void* data, size_t size, EntityB* out_object);

/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// The object must be freed after use by calling EntityB_free();
static EntityB* EntityB_new_from_flatbuffer(const void* data, size_t size);

/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
static void EntityB_free_pointers(EntityB* object);

/// Free EntityB* object pointer and all its property pointers (vectors and strings).
Expand Down Expand Up @@ -140,7 +140,7 @@ static void EntityB_free(EntityB* object) {
}

/// Insert or update the given object in the database.
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// was already specified (non-zero), it will remain unchanged.
/// @return object ID from the object param (see object param docs) or a zero on error. If a zero was returned, you can
/// check obx_last_error_*() to get the error details. In an unlikely event that those functions return no error
Expand Down
21 changes: 10 additions & 11 deletions test/comparison/testdata/fbs/typeful/c/other.obx.h.expected
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ static bool test_Other_to_flatbuffer(flatcc_builder_t* B, const test_Other* obje

/// Read an object from a valid FlatBuffer.
/// If the read object contains vectors or strings, those are allocated on heap and must be freed after use by calling test_Other_free_pointers().
/// Thus, when calling this function multiple times on the same object, ensure to call test_Other_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// Thus, when calling this function multiple times on the same object, ensure to call test_Other_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// allocated by this function will also be freed before returning, allowing you to retry.
static bool test_Other_from_flatbuffer(const void* data, size_t size, test_Other* out_object);

/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// The object must be freed after use by calling test_Other_free();
static test_Other* test_Other_new_from_flatbuffer(const void* data, size_t size);

/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
static void test_Other_free_pointers(test_Other* object);

/// Free test_Other* object pointer and all its property pointers (vectors and strings).
Expand All @@ -68,16 +68,16 @@ static bool test2_multi_Another_to_flatbuffer(flatcc_builder_t* B, const test2_m

/// Read an object from a valid FlatBuffer.
/// If the read object contains vectors or strings, those are allocated on heap and must be freed after use by calling test2_multi_Another_free_pointers().
/// Thus, when calling this function multiple times on the same object, ensure to call test2_multi_Another_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// Thus, when calling this function multiple times on the same object, ensure to call test2_multi_Another_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// allocated by this function will also be freed before returning, allowing you to retry.
static bool test2_multi_Another_from_flatbuffer(const void* data, size_t size, test2_multi_Another* out_object);

/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// The object must be freed after use by calling test2_multi_Another_free();
static test2_multi_Another* test2_multi_Another_new_from_flatbuffer(const void* data, size_t size);

/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
static void test2_multi_Another_free_pointers(test2_multi_Another* object);

/// Free test2_multi_Another* object pointer and all its property pointers (vectors and strings).
Expand Down Expand Up @@ -151,7 +151,7 @@ static void test_Other_free(test_Other* object) {
}

/// Insert or update the given object in the database.
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// was already specified (non-zero), it will remain unchanged.
/// @return object ID from the object param (see object param docs) or a zero on error. If a zero was returned, you can
/// check obx_last_error_*() to get the error details. In an unlikely event that those functions return no error
Expand All @@ -175,7 +175,6 @@ static test_Other* test_Other_get(OBX_box* box, obx_id id) {
return (test_Other*) other_obx_h_get_object(box, id, (void* (*) (const void*, size_t)) test_Other_new_from_flatbuffer);
}

/// Write given object to the FlatBufferBuilder
static bool test2_multi_Another_to_flatbuffer(flatcc_builder_t* B, const test2_multi_Another* object, void** out_buffer, size_t* out_size) {
assert(B);
assert(object);
Expand Down Expand Up @@ -243,7 +242,7 @@ static void test2_multi_Another_free(test2_multi_Another* object) {
}

/// Insert or update the given object in the database.
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// was already specified (non-zero), it will remain unchanged.
/// @return object ID from the object param (see object param docs) or a zero on error. If a zero was returned, you can
/// check obx_last_error_*() to get the error details. In an unlikely event that those functions return no error
Expand Down
32 changes: 15 additions & 17 deletions test/comparison/testdata/fbs/typeful/c/schema.obx.h.expected
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ static bool Annotated_to_flatbuffer(flatcc_builder_t* B, const Annotated* object

/// Read an object from a valid FlatBuffer.
/// If the read object contains vectors or strings, those are allocated on heap and must be freed after use by calling Annotated_free_pointers().
/// Thus, when calling this function multiple times on the same object, ensure to call Annotated_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// Thus, when calling this function multiple times on the same object, ensure to call Annotated_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// allocated by this function will also be freed before returning, allowing you to retry.
static bool Annotated_from_flatbuffer(const void* data, size_t size, Annotated* out_object);

/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// The object must be freed after use by calling Annotated_free();
static Annotated* Annotated_new_from_flatbuffer(const void* data, size_t size);

/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
static void Annotated_free_pointers(Annotated* object);

/// Free Annotated* object pointer and all its property pointers (vectors and strings).
Expand All @@ -75,16 +75,16 @@ static bool Simple_to_flatbuffer(flatcc_builder_t* B, const Simple* object, void

/// Read an object from a valid FlatBuffer.
/// If the read object contains vectors or strings, those are allocated on heap and must be freed after use by calling Simple_free_pointers().
/// Thus, when calling this function multiple times on the same object, ensure to call Simple_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// Thus, when calling this function multiple times on the same object, ensure to call Simple_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// allocated by this function will also be freed before returning, allowing you to retry.
static bool Simple_from_flatbuffer(const void* data, size_t size, Simple* out_object);

/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// The object must be freed after use by calling Simple_free();
static Simple* Simple_new_from_flatbuffer(const void* data, size_t size);

/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
static void Simple_free_pointers(Simple* object);

/// Free Simple* object pointer and all its property pointers (vectors and strings).
Expand Down Expand Up @@ -153,16 +153,16 @@ static bool Typeful_to_flatbuffer(flatcc_builder_t* B, const Typeful* object, vo

/// Read an object from a valid FlatBuffer.
/// If the read object contains vectors or strings, those are allocated on heap and must be freed after use by calling Typeful_free_pointers().
/// Thus, when calling this function multiple times on the same object, ensure to call Typeful_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// Thus, when calling this function multiple times on the same object, ensure to call Typeful_free_pointers() before subsequent calls to avoid leaks.
/// @returns true if the object was deserialized successfully or false on (allocation) error in which case any memory
/// allocated by this function will also be freed before returning, allowing you to retry.
static bool Typeful_from_flatbuffer(const void* data, size_t size, Typeful* out_object);

/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// Read an object from a valid FlatBuffer, allocating the object on heap.
/// The object must be freed after use by calling Typeful_free();
static Typeful* Typeful_new_from_flatbuffer(const void* data, size_t size);

/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
/// Free memory allocated for vector and string properties, setting the freed pointers to NULL.
static void Typeful_free_pointers(Typeful* object);

/// Free Typeful* object pointer and all its property pointers (vectors and strings).
Expand Down Expand Up @@ -266,7 +266,7 @@ static void Annotated_free(Annotated* object) {
}

/// Insert or update the given object in the database.
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// was already specified (non-zero), it will remain unchanged.
/// @return object ID from the object param (see object param docs) or a zero on error. If a zero was returned, you can
/// check obx_last_error_*() to get the error details. In an unlikely event that those functions return no error
Expand All @@ -290,7 +290,6 @@ static Annotated* Annotated_get(OBX_box* box, obx_id id) {
return (Annotated*) schema_obx_h_get_object(box, id, (void* (*) (const void*, size_t)) Annotated_new_from_flatbuffer);
}

/// Write given object to the FlatBufferBuilder
static bool Simple_to_flatbuffer(flatcc_builder_t* B, const Simple* object, void** out_buffer, size_t* out_size) {
assert(B);
assert(object);
Expand Down Expand Up @@ -354,7 +353,7 @@ static void Simple_free(Simple* object) {
}

/// Insert or update the given object in the database.
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// was already specified (non-zero), it will remain unchanged.
/// @return object ID from the object param (see object param docs) or a zero on error. If a zero was returned, you can
/// check obx_last_error_*() to get the error details. In an unlikely event that those functions return no error
Expand All @@ -378,7 +377,6 @@ static Simple* Simple_get(OBX_box* box, obx_id id) {
return (Simple*) schema_obx_h_get_object(box, id, (void* (*) (const void*, size_t)) Simple_new_from_flatbuffer);
}

/// Write given object to the FlatBufferBuilder
static bool Typeful_to_flatbuffer(flatcc_builder_t* B, const Typeful* object, void** out_buffer, size_t* out_size) {
assert(B);
assert(object);
Expand Down Expand Up @@ -648,7 +646,7 @@ static void Typeful_free(Typeful* object) {
}

/// Insert or update the given object in the database.
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// @param object (in & out) will be updated with a newly inserted ID if the one specified previously was zero. If an ID
/// was already specified (non-zero), it will remain unchanged.
/// @return object ID from the object param (see object param docs) or a zero on error. If a zero was returned, you can
/// check obx_last_error_*() to get the error details. In an unlikely event that those functions return no error
Expand Down

0 comments on commit 6784dd6

Please sign in to comment.