Skip to content

Commit

Permalink
Bump to version 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelfj committed May 23, 2022
1 parent 7c451ea commit d17e324
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 35 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Change Log

## [0.6.1-pre]
## [0.6.1]

- Add `flatcc_builder_alloc` and `flatcc_builder_free` to handle situations
where stanard allocation has been redefined via macros so `free` is no longer
where standard allocation has been redefined via macros so `free` is no longer
safe to use. These are similar to the existing `aligned_alloc/free` functions.
- Fix a potential, but never seen, low level race condition in the builder when
writing a union field because the builder might reallocate between type
Expand Down
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ executable also handle optional json parsing or printing in less than 2 us for a
* [Poll on Meson Build](#poll-on-meson-build)
* [Reporting Bugs](#reporting-bugs)
* [Status](#status)
* [Main features supported as of 0.6.0](#main-features-supported-as-of-060)
* [Main features supported as of 0.6.1](#main-features-supported-as-of-061)
* [Supported platforms (CI tested)](#supported-platforms-ci-tested)
* [Platforms reported to work by users](#platforms-reported-to-work-by-users)
* [Portability](#portability)
Expand Down Expand Up @@ -292,6 +292,20 @@ fi

## Status

Release 0.6.1 contains primarily bug fixes and numerous contributions
from the community to handle platform edge cases. Additionally,
pendantic GCC warnings are disabled, relying instead on clang, since GCC
is too aggressive, breaks builds frequently and works against
portability. An existing C++ test case ensures that C code also works
with common C++ compilers, but it can break some environments, so there
is now a flag to disable that test without disabling all tests. Support
for Optional Scalar Values in the FlatBuffer format has been added.
There is also improved support for abstracting memory allocation on
various platforms. `<table>_identifier` has been deprecated in favor
`<table>_file_identifier` in generated code due to `identifier` easily
leading to name conflicts. `file_extension` constant in generated code
is now without prefixed dot (.).

Release 0.6.0 introduces a "primary" attribute to be used together with
a key attribute to chose default key for finding and sorting. If primary
is absent, the key with the lowest id becomes primary. Tables and
Expand Down Expand Up @@ -339,7 +353,7 @@ low-level union interface so the terms { type, value } are used
consistently over { type, member } and { types, members }.


### Main features supported as of 0.6.0
### Main features supported as of 0.6.1

- generated FlatBuffers reader and builder headers for C
- generated FlatBuffers verifier headers for C
Expand All @@ -364,6 +378,7 @@ consistently over { type, member } and { types, members }.
- base64(url) encoded binary data in JSON.
- sort fields by primary key (as of 0.6.0)
- char arrays (as of 0.6.0)
- optional scalar values (as of 0.6.1)

There are no plans to make frequent updates once the project becomes
stable, but input from the community will always be welcome and included
Expand Down
4 changes: 2 additions & 2 deletions include/flatcc/flatcc_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
extern "C" {
#endif

#define FLATCC_VERSION_TEXT "0.6.1-dev"
#define FLATCC_VERSION_TEXT "0.6.1"
#define FLATCC_VERSION_MAJOR 0
#define FLATCC_VERSION_MINOR 6
#define FLATCC_VERSION_PATCH 1
/* 1 or 0 */
#define FLATCC_VERSION_RELEASED 0
#define FLATCC_VERSION_RELEASED 1

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion include/flatcc/reflection/flatbuffers_common_builder.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#define FLATBUFFERS_COMMON_BUILDER_H

/* Generated by flatcc 0.6.1-dev FlatBuffers schema compiler for C by dvide.com */
/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

/* Common FlatBuffers build functionality for C. */

Expand Down
2 changes: 1 addition & 1 deletion include/flatcc/reflection/flatbuffers_common_reader.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef FLATBUFFERS_COMMON_READER_H
#define FLATBUFFERS_COMMON_READER_H

/* Generated by flatcc 0.6.1-dev FlatBuffers schema compiler for C by dvide.com */
/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

/* Common FlatBuffers read functionality for C. */

Expand Down
4 changes: 2 additions & 2 deletions include/flatcc/reflection/reflection_builder.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef REFLECTION_BUILDER_H
#define REFLECTION_BUILDER_H

/* Generated by flatcc 0.6.1-dev FlatBuffers schema compiler for C by dvide.com */
/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef REFLECTION_READER_H
#include "reflection_reader.h"
Expand All @@ -13,7 +13,7 @@
#undef flatbuffers_identifier
#define flatbuffers_identifier "BFBS"
#undef flatbuffers_extension
#define flatbuffers_extension ".bfbs"
#define flatbuffers_extension "bfbs"

#define __reflection_BaseType_formal_args , reflection_BaseType_enum_t v0
#define __reflection_BaseType_call_args , v0
Expand Down
67 changes: 47 additions & 20 deletions include/flatcc/reflection/reflection_reader.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef REFLECTION_READER_H
#define REFLECTION_READER_H

/* Generated by flatcc 0.6.1-dev FlatBuffers schema compiler for C by dvide.com */
/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
Expand All @@ -14,7 +14,7 @@
#undef flatbuffers_identifier
#define flatbuffers_identifier "BFBS"
#undef flatbuffers_extension
#define flatbuffers_extension ".bfbs"
#define flatbuffers_extension "bfbs"


typedef const struct reflection_Type_table *reflection_Type_table_t;
Expand Down Expand Up @@ -54,86 +54,113 @@ typedef struct reflection_Schema_table *reflection_Schema_mutable_table_t;
typedef const flatbuffers_uoffset_t *reflection_Schema_vec_t;
typedef flatbuffers_uoffset_t *reflection_Schema_mutable_vec_t;
#ifndef reflection_Type_file_identifier
#define reflection_Type_file_identifier flatbuffers_identifier
#define reflection_Type_file_identifier "BFBS"
#endif
/* deprecated, use reflection_Type_file_identifier */
#ifndef reflection_Type_identifier
#define reflection_Type_identifier flatbuffers_identifier
#define reflection_Type_identifier "BFBS"
#endif
#define reflection_Type_type_hash ((flatbuffers_thash_t)0x44c8fe5e)
#define reflection_Type_type_identifier "\x5e\xfe\xc8\x44"
#ifndef reflection_Type_file_extension
#define reflection_Type_file_extension "bfbs"
#endif
#ifndef reflection_KeyValue_file_identifier
#define reflection_KeyValue_file_identifier flatbuffers_identifier
#define reflection_KeyValue_file_identifier "BFBS"
#endif
/* deprecated, use reflection_KeyValue_file_identifier */
#ifndef reflection_KeyValue_identifier
#define reflection_KeyValue_identifier flatbuffers_identifier
#define reflection_KeyValue_identifier "BFBS"
#endif
#define reflection_KeyValue_type_hash ((flatbuffers_thash_t)0x8c761eaa)
#define reflection_KeyValue_type_identifier "\xaa\x1e\x76\x8c"
#ifndef reflection_KeyValue_file_extension
#define reflection_KeyValue_file_extension "bfbs"
#endif
#ifndef reflection_EnumVal_file_identifier
#define reflection_EnumVal_file_identifier flatbuffers_identifier
#define reflection_EnumVal_file_identifier "BFBS"
#endif
/* deprecated, use reflection_EnumVal_file_identifier */
#ifndef reflection_EnumVal_identifier
#define reflection_EnumVal_identifier flatbuffers_identifier
#define reflection_EnumVal_identifier "BFBS"
#endif
#define reflection_EnumVal_type_hash ((flatbuffers_thash_t)0x9531c946)
#define reflection_EnumVal_type_identifier "\x46\xc9\x31\x95"
#ifndef reflection_EnumVal_file_extension
#define reflection_EnumVal_file_extension "bfbs"
#endif
#ifndef reflection_Enum_file_identifier
#define reflection_Enum_file_identifier flatbuffers_identifier
#define reflection_Enum_file_identifier "BFBS"
#endif
/* deprecated, use reflection_Enum_file_identifier */
#ifndef reflection_Enum_identifier
#define reflection_Enum_identifier flatbuffers_identifier
#define reflection_Enum_identifier "BFBS"
#endif
#define reflection_Enum_type_hash ((flatbuffers_thash_t)0xacffa90f)
#define reflection_Enum_type_identifier "\x0f\xa9\xff\xac"
#ifndef reflection_Enum_file_extension
#define reflection_Enum_file_extension "bfbs"
#endif
#ifndef reflection_Field_file_identifier
#define reflection_Field_file_identifier flatbuffers_identifier
#define reflection_Field_file_identifier "BFBS"
#endif
/* deprecated, use reflection_Field_file_identifier */
#ifndef reflection_Field_identifier
#define reflection_Field_identifier flatbuffers_identifier
#define reflection_Field_identifier "BFBS"
#endif
#define reflection_Field_type_hash ((flatbuffers_thash_t)0x9f7e408a)
#define reflection_Field_type_identifier "\x8a\x40\x7e\x9f"
#ifndef reflection_Field_file_extension
#define reflection_Field_file_extension "bfbs"
#endif
#ifndef reflection_Object_file_identifier
#define reflection_Object_file_identifier flatbuffers_identifier
#define reflection_Object_file_identifier "BFBS"
#endif
/* deprecated, use reflection_Object_file_identifier */
#ifndef reflection_Object_identifier
#define reflection_Object_identifier flatbuffers_identifier
#define reflection_Object_identifier "BFBS"
#endif
#define reflection_Object_type_hash ((flatbuffers_thash_t)0xb09729bd)
#define reflection_Object_type_identifier "\xbd\x29\x97\xb0"
#ifndef reflection_Object_file_extension
#define reflection_Object_file_extension "bfbs"
#endif
#ifndef reflection_RPCCall_file_identifier
#define reflection_RPCCall_file_identifier flatbuffers_identifier
#define reflection_RPCCall_file_identifier "BFBS"
#endif
/* deprecated, use reflection_RPCCall_file_identifier */
#ifndef reflection_RPCCall_identifier
#define reflection_RPCCall_identifier flatbuffers_identifier
#define reflection_RPCCall_identifier "BFBS"
#endif
#define reflection_RPCCall_type_hash ((flatbuffers_thash_t)0xe2d586f1)
#define reflection_RPCCall_type_identifier "\xf1\x86\xd5\xe2"
#ifndef reflection_RPCCall_file_extension
#define reflection_RPCCall_file_extension "bfbs"
#endif
#ifndef reflection_Service_file_identifier
#define reflection_Service_file_identifier flatbuffers_identifier
#define reflection_Service_file_identifier "BFBS"
#endif
/* deprecated, use reflection_Service_file_identifier */
#ifndef reflection_Service_identifier
#define reflection_Service_identifier flatbuffers_identifier
#define reflection_Service_identifier "BFBS"
#endif
#define reflection_Service_type_hash ((flatbuffers_thash_t)0xf31a13b5)
#define reflection_Service_type_identifier "\xb5\x13\x1a\xf3"
#ifndef reflection_Service_file_extension
#define reflection_Service_file_extension "bfbs"
#endif
#ifndef reflection_Schema_file_identifier
#define reflection_Schema_file_identifier flatbuffers_identifier
#define reflection_Schema_file_identifier "BFBS"
#endif
/* deprecated, use reflection_Schema_file_identifier */
#ifndef reflection_Schema_identifier
#define reflection_Schema_identifier flatbuffers_identifier
#define reflection_Schema_identifier "BFBS"
#endif
#define reflection_Schema_type_hash ((flatbuffers_thash_t)0xfaf93779)
#define reflection_Schema_type_identifier "\x79\x37\xf9\xfa"
#ifndef reflection_Schema_file_extension
#define reflection_Schema_file_extension "bfbs"
#endif

typedef int8_t reflection_BaseType_enum_t;
__flatbuffers_define_integer_type(reflection_BaseType, reflection_BaseType_enum_t, 8)
Expand Down
2 changes: 1 addition & 1 deletion include/flatcc/reflection/reflection_verifier.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef REFLECTION_VERIFIER_H
#define REFLECTION_VERIFIER_H

/* Generated by flatcc 0.6.1-dev FlatBuffers schema compiler for C by dvide.com */
/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef REFLECTION_READER_H
#include "reflection_reader.h"
Expand Down
7 changes: 3 additions & 4 deletions src/compiler/codegen_schema.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,17 +465,15 @@ static void sort_objects(void *buffer)
static FILE *open_file(fb_options_t *opts, fb_schema_t *S)
{
FILE *fp = 0;
char *path;
char *path = 0, *ext = 0;
const char *prefix = opts->outpath ? opts->outpath : "";
size_t len, prefix_len = strlen(prefix);
const char *name;
const char *ext;

name = S->basename;
len = strlen(name);

ext = flatbuffers_extension;

ext = fb_create_path_ext(".", flatbuffers_extension);
/* We generally should not use cgen options here, but in this case it makes sense. */
if (opts->gen_stdout) {
return stdout;
Expand All @@ -486,6 +484,7 @@ static FILE *open_file(fb_options_t *opts, fb_schema_t *S)
fprintf(stderr, "error opening file for writing binary schema: %s\n", path);
}
free(path);
free(ext);
return fp;
}

Expand Down

0 comments on commit d17e324

Please sign in to comment.