1. 18 May, 2018 2 commits
    • Dan Field's avatar
      Add [Dart] support (#4676) · 88912640
      Dan Field authored
      * Add [Dart] support
      
      * fix enum vectors
      
      * Allow for opt out of string interning
      
      * fix comment style, make interning opt in
      
      * remove Offset<T>, prefer int
      
      * avoid creating unnecessary vtable objects
      
      * start work on tests - do not generate builder if struct has 0 fields - add int64
      
      * support reading structs properly
      
      * correctly handle reading vectors of structs, dartfmt
      
      * support structs, fix unnecessary prepares
      
      * fix bool customizations
      
      * undo unintentional removal of file
      
      * docs updates, complete tutorial, bug fix for codegen
      
      * more documentation
      
      * Update docs, add to doxygen file
      
      * update package structure, add samples script/code
      
      * rearrange sample
      
      * Tests
      
      * Add readme for pub
      
      * cleanup package for pub
      
      * update docs for renamed file
      
      * remove custom matcher, use `closeTo` instead
      
      * remove unintentional file
      
      * remove unintended file checkin
      
      * use auto, move method, cleanup
      
      * refactor to ObjectBuilders, add Builders
      
      * Update tests, examples
      
      * Add files missing from previous commit
      
      * documentation and example updates
      
      * Update LICENSE, make dartanalyzer happy, fix minor bugs, get rid of duplicate files, publish script
      
      * fix sample for slightly different schema
      
      * Update pubspec.yaml
      88912640
    • joligarson's avatar
      Fix undertermined execution behavior (#4751) · c43a0bef
      joligarson authored
      Fix for the issue #4744: Ambiguous side-effect execution on vector_downward::make_space() method.
      C++ does not impose evaluation order on the two expressions on the right side of the assignment, so compiler can freely decide. As ensure_space() method can change the value of "cur_" variable, the result of the subtraction may be different depending on the evaluation order, which is ambiguous in C++.
      In order to make this code deterministic and correct, cur_ must be evaluated after ensure_space() is called.
      c43a0bef
  2. 14 May, 2018 3 commits
    • Tin Tvrtković's avatar
      [BREAKING CHANGE] Python: handle bool table fields properly. (#4736) · a9640bd9
      Tin Tvrtković authored
      * Python: handle bool table fields properly.
      
      * Small refactor.
      
      * Use snake_case instead of camelCase. Use auto.
      a9640bd9
    • Kamil Rojewski's avatar
      Vector of unions support for java and c# (#4735) · f11ffedb
      Kamil Rojewski authored
      * Eclipse ignore
      
      * TypeScript support
      
      * Prefixing enums
      
      * Test results
      
      * Merged JS and TS generators
      
      * Fixed AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Changed TS flag to options struct
      
      * Storing options by value
      
      * Removed unneeded const
      
      * Re-export support for unions
      
      * Uint support
      
      * Casting bools to numbers for mutation
      
      * TS shell tests
      
      * Reverted generates js test file to original version
      
      * Backing up js tests and properly generating test data
      
      * Not importing flatbuffers for TS test generation
      
      * Not overwriting generated js for tests
      
      * AppVeyor test fixes
      
      * Generating the most strict TS code possible
      
      * Not returning null when creating vectors
      
      * Not returning null from struct contructors
      
      * Vector of unions for ts/js
      
      * Sanity check for languages
      
      * Indentation fix + output test files
      
      * Vectors of unions for php
      
      * Fixes to union vector handling + tests
      
      * Fix for strictPropertyInitialization
      
      * Fix for new aligned operator new for gcc >= 7.1
      
      * Not generating imports/ns prefixes with --gen-all
      
      * TypeScript docs
      
      * Missing imports of enums
      
      * Missing TS links
      
      * Enabled vector of unions for java, since it seems to work
      
      * Added jitpack config
      
      * Added obj to vector of unions getter
      
      * Removed unneeded accessor
      
      * Bumped jdk version in pom.xml
      
      * Vector of unions support for c#
      f11ffedb
    • Keef Aragon's avatar
      5d42c835
  3. 10 May, 2018 4 commits
    • Paul Reimer's avatar
      Add define/ifdef blocks, alternate sprintf implementation via… · 7c1203d4
      Paul Reimer authored
      Add define/ifdef blocks, alternate sprintf implementation via FLATBUFFERS_PREFER_PRINTF [C++] (#4700)
      
      * Add define/ifdef blocks for FLATBUFFERS_PREFER_PRINTF to avoid using std::*streams for idl_parser
      
      * Use string::size() as limit in snprintf
      
      * Refactored FLATBUFFERS_PREFER_PRINTF guarded feature into NumToStringImplWrapper around sprintf
      
      * Remove '.0' where not needed from IntToDigitCount
      
      * Remove leading dot from name in GetFullyQualifiedName when FLATBUFFERS_PREFER_PRINTF is enabled
      
      * Return string directly from conversion functions where possible when FLATBUFFERS_PREFER_PRINTF is enabled
      
      * Use string instead of stringstream for GetFullyQualifiedName
      
      * Revert removing leading dot from GetFullyQualifiedName, it does need to be there for parity with the stringstream implementation
      
      * Dot is single char in Namespace::GetFullyQualifiedName
      
      * Remove trailing (duplicate) null-byte from NumToStringImplWrapper when using FLATBUFFERS_PREFER_PRINTF.
      
      * Update preprocessor indenting (and use clang-format off/on) for FLATBUFFERS_PREFER_PRINTF
      
      * Reduce whitespace, unneeded braces in FLATBUFFERS_PREFER_PRINTF string width functions
      
      * Remove unneeded use of iostream from idl_parser.cpp, std::string is used instead
      
      * Tell snprintf to use the trailing null byte expected at the end of std::string buffer
      7c1203d4
    • Paul Reimer's avatar
      Add string view [C++] (#4730) · a0a33d94
      Paul Reimer authored
      * Add view() method on flatbuffers::String, to return a string_view type
      if support for std::string_view (or alternately
      std::experimental::string_view) is found
      
      * Move detection/definition of FLATBUFFERS_STRING_VIEW to base.h, use the
      macro (if it is defined) as the argument type for an overload of CreateString
      
      * Rename String::view() to String::string_view() and use the existing c_str() method for the data pointer
      
      * Add and explain minimum C++ standard version checks for FLATBUFFERS_STRING_VIEW implementations
      
      * Updated preprocessor indenting for FLATBUFFERS_STRING_VIEW
      
      * Convert FLATBUFFERS_STRING_VIEW macro to typedef in flatbuffers:: namespace, and boolean feature toggle macro FLATBUFFERS_HAS_STRING_VIEW
      
      * Prepend flatbuffers:: namespace to disambiguate flatbuffers::string_view typedef from String::string_view()
      
      * clang-format as-she-is-spoke for FLATBUFFERS_HAS_STRING_VIEW
      a0a33d94
    • Tin Tvrtković's avatar
      Python: return None for missing strings. (#4733) · b10123ff
      Tin Tvrtković authored
      [BREAKING CHANGE] Python: return None for missing strings.
      b10123ff
    • Mike Mansell's avatar
      Remove @Nullable (Java) for required fields (fixes #4724) (#4726) · 3a2c5355
      Mike Mansell authored
      @Nullable is only a compiler informational attribute.
      Removing for required fields improves compiler warnings
      but doesn't impact any running code.
      3a2c5355
  4. 07 May, 2018 2 commits
  5. 03 May, 2018 3 commits
  6. 30 Apr, 2018 1 commit
    • husobee's avatar
      Addition of Go FinishWithFileIdentifier (#4720) · bed19a53
      husobee authored
      * Addition of Go FinishWithFileIdentifier, allows for Go flatbuffer data to contain a file identifier
      
      * adding panic as per review if fileIdentifier does not match length, letting prep pad the file identifier
      
      * updated error message to not use fmt.Sprintf
      
      * using minalign for alignment for file identifier
      bed19a53
  7. 27 Apr, 2018 1 commit
  8. 23 Apr, 2018 1 commit
  9. 16 Apr, 2018 1 commit
  10. 06 Apr, 2018 2 commits
    • Sergey Avseyev's avatar
      Remove unnecessary const qualifier (#4698) · 86153fd7
      Sergey Avseyev authored
      In file included from include/flatbuffers/flexbuffers.h:24,
                       from src/idl_gen_text.cpp:20:
      include/flatbuffers/util.h: In function 'int flatbuffers::FromUTF8(const char**)':
      include/flatbuffers/util.h:324:45: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
         if ((static_cast<const unsigned char>(**in) << len) & 0x80) return -1;  // Bit after leading 1's must be 0.
                                                   ^
      cc1plus: all warnings being treated as errors
      make[2]: *** [CMakeFiles/flatbuffers_shared.dir/build.make:92: CMakeFiles/flatbuffers_shared.dir/src/idl_gen_text.cpp.o] Error 1
      86153fd7
    • Vladimir Glavnyy's avatar
      An user-defined attribute name validation (#4689) · 7eb4c609
      Vladimir Glavnyy authored
      * User-declared attribute should be either identifier or string with the identifier.
      
      * Attribute can be identifier or string in metadata.
      7eb4c609
  11. 05 Apr, 2018 6 commits
    • Paul Reimer's avatar
      Rename MANUALLY_ALIGNED_STRUCT to add FLATBUFFERS_ prefix in generated code… · af3c5981
      Paul Reimer authored
      Rename MANUALLY_ALIGNED_STRUCT to add FLATBUFFERS_ prefix in generated code within tests/. Via running `cd tests && sh generate_code.sh` (#4696)
      
      af3c5981
    • Paul Reimer's avatar
      Add FLATBUFFERS_ prefix to defines [C++] (#4695) · eac0bc64
      Paul Reimer authored
      * Rename STRUCT_END to add FLATBUFFERS_ prefix, now FLATBUFFERS_STRUCT_END. Via running `ag -l STRUCT_END | xargs rpl STRUCT_END FLATBUFFERS_STRUCT_END`
      
      * Rename MANUALLY_ALIGNED_STRUCT to add FLATBUFFERS_ prefix, now FLATBUFFERS_MANUALLY_ALIGNED_STRUCT. Via running `ag -l MANUALLY_ALIGNED_STRUCT | xargs rpl MANUALLY_ALIGNED_STRUCT FLATBUFFERS_MANUALLY_ALIGNED_STRUCT && cd tests && sh generate_code.sh`
      
      * Rename DEFINE_BITMASK_OPERATORS to add FLATBUFFERS_ prefix, now FLATBUFFERS_DEFINE_BITMASK_OPERATORS. Via running `ag -l DEFINE_BITMASK_OPERATORS | xargs rpl DEFINE_BITMASK_OPERATORS FLATBUFFERS_DEFINE_BITMASK_OPERATORS`
      eac0bc64
    • Wouter van Oortmerssen's avatar
      Update version number to 1.9 · 20a400e9
      Wouter van Oortmerssen authored
      Change-Id: I0b0ed43129c4d8fc88a177792df50adfeb52a1e3
      20a400e9
    • Wouter van Oortmerssen's avatar
      Added missing generated code files. · 676f0248
      Wouter van Oortmerssen authored
      Change-Id: I59af6ca1825870461c0badc7e7a045b97befdc1a
      676f0248
    • Kamil Rojewski's avatar
      Missing TS links in docs (#4693) · 34b8b80f
      Kamil Rojewski authored
      * Eclipse ignore
      
      * TypeScript support
      
      * Prefixing enums
      
      * Test results
      
      * Merged JS and TS generators
      
      * Fixed AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Changed TS flag to options struct
      
      * Storing options by value
      
      * Removed unneeded const
      
      * Re-export support for unions
      
      * Uint support
      
      * Casting bools to numbers for mutation
      
      * TS shell tests
      
      * Reverted generates js test file to original version
      
      * Backing up js tests and properly generating test data
      
      * Not importing flatbuffers for TS test generation
      
      * Not overwriting generated js for tests
      
      * AppVeyor test fixes
      
      * Generating the most strict TS code possible
      
      * Not returning null when creating vectors
      
      * Not returning null from struct contructors
      
      * Vector of unions for ts/js
      
      * Sanity check for languages
      
      * Indentation fix + output test files
      
      * Vectors of unions for php
      
      * Fixes to union vector handling + tests
      
      * Fix for strictPropertyInitialization
      
      * Fix for new aligned operator new for gcc >= 7.1
      
      * Not generating imports/ns prefixes with --gen-all
      
      * TypeScript docs
      
      * Missing imports of enums
      
      * Missing TS links
      34b8b80f
    • Juyeon Yoon's avatar
      Remove line break of CMakeLists.txt (#4691) · 0998861e
      Juyeon Yoon authored
      Fix #4650
      0998861e
  12. 02 Apr, 2018 1 commit
  13. 26 Mar, 2018 1 commit
    • Kamil Rojewski's avatar
      Fix for missing enum imports (#4683) · d3a00f77
      Kamil Rojewski authored
      * Eclipse ignore
      
      * TypeScript support
      
      * Prefixing enums
      
      * Test results
      
      * Merged JS and TS generators
      
      * Fixed AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Changed TS flag to options struct
      
      * Storing options by value
      
      * Removed unneeded const
      
      * Re-export support for unions
      
      * Uint support
      
      * Casting bools to numbers for mutation
      
      * TS shell tests
      
      * Reverted generates js test file to original version
      
      * Backing up js tests and properly generating test data
      
      * Not importing flatbuffers for TS test generation
      
      * Not overwriting generated js for tests
      
      * AppVeyor test fixes
      
      * Generating the most strict TS code possible
      
      * Not returning null when creating vectors
      
      * Not returning null from struct contructors
      
      * Vector of unions for ts/js
      
      * Sanity check for languages
      
      * Indentation fix + output test files
      
      * Vectors of unions for php
      
      * Fixes to union vector handling + tests
      
      * Fix for strictPropertyInitialization
      
      * Fix for new aligned operator new for gcc >= 7.1
      
      * Not generating imports/ns prefixes with --gen-all
      
      * TypeScript docs
      
      * Missing imports of enums
      d3a00f77
  14. 23 Mar, 2018 2 commits
    • Kamil Rojewski's avatar
      TypeScript docs (#4680) · cc549638
      Kamil Rojewski authored
      * Eclipse ignore
      
      * TypeScript support
      
      * Prefixing enums
      
      * Test results
      
      * Merged JS and TS generators
      
      * Fixed AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Changed TS flag to options struct
      
      * Storing options by value
      
      * Removed unneeded const
      
      * Re-export support for unions
      
      * Uint support
      
      * Casting bools to numbers for mutation
      
      * TS shell tests
      
      * Reverted generates js test file to original version
      
      * Backing up js tests and properly generating test data
      
      * Not importing flatbuffers for TS test generation
      
      * Not overwriting generated js for tests
      
      * AppVeyor test fixes
      
      * Generating the most strict TS code possible
      
      * Not returning null when creating vectors
      
      * Not returning null from struct contructors
      
      * Vector of unions for ts/js
      
      * Sanity check for languages
      
      * Indentation fix + output test files
      
      * Vectors of unions for php
      
      * Fixes to union vector handling + tests
      
      * Fix for strictPropertyInitialization
      
      * Fix for new aligned operator new for gcc >= 7.1
      
      * Not generating imports/ns prefixes with --gen-all
      
      * TypeScript docs
      cc549638
    • Flaviu's avatar
      Const correctness in generated code and in code generators. Added missing… · 79f62ee3
      Flaviu authored
      Const correctness in generated code and in code generators. Added missing \reflection\generate_code.bat file. (#4679)
      
      79f62ee3
  15. 15 Mar, 2018 1 commit
  16. 12 Mar, 2018 2 commits
    • Robert Schmidtke's avatar
      Java/C#/Python prefixed size support (#4445) · 08cf50c5
      Robert Schmidtke authored
      * initial changes to support size prefixed buffers in Java
      
      * add slice equivalent to CSharp ByteBuffer
      
      * resolve TODO for slicing in CSharp code generation
      
      * add newly generated Java and CSharp test sources
      
      * fix typo in comment
      
      * add FinishSizePrefixed methods to CSharp FlatBufferBuilder as well
      
      * add option to allow writing the prefix as well
      
      * generate size-prefixed monster binary as well
      
      * extend JavaTest to test the size prefixed binary as well
      
      * use constants for size prefix length
      
      * fuse common code for getRootAs and getSizePrefixedRootAs
      
      * pulled file identifier out of if
      
      * add FinishSizePrefixed, GetSizePrefixedRootAs support for Python
      
      * Revert "extend JavaTest to test the size prefixed binary as well"
      
      This reverts commit 68be4420dda47e8d0600bb19691f03be71503a68.
      
      * Revert "generate size-prefixed monster binary as well"
      
      This reverts commit 2939516fdf78df4f061c627221e232b312301417.
      
      * fix ByteBuffer.cs Slice() method; add proper CSharp and Java tests
      
      * fix unused parameter
      
      * increment version number
      
      * pulled out generated methods into separate utility class
      
      * pulled out generated methods into separate utility class for Python
      
      * fix indentation
      
      * remove unnecessary comment
      
      * fix newline and copyright
      
      * add ByteBufferUtil to csproj compilation
      
      * hide ByteBuffer's internal data; track offset into parent's array
      
      * test unsafe versions as well; compile and run in debug mode
      
      * clarify help text for size prefix
      
      * move ByteBuffer slicing behavior to subclass
      
      * fix protection levels
      
      * add size prefix support for text generation
      
      * add ByteBufferSlice to csproj compilation
      
      * revert size prefix handling for nested buffers
      
      * use duplicate instead of slice for removing size prefix
      
      * remove slice subclass and use duplicate for removing size prefix
      
      * remove slice specific tests
      
      * remove superfluous command line option
      08cf50c5
    • Sergey Avseyev's avatar
      Remove unnecessary const qualifier from cast (#4666) · 6b3f057b
      Sergey Avseyev authored
      Const does not make sense here, and compiler actually throws warning
      (error with -Werror) when you would try to compile it.
      
          In file included from include/flatbuffers/flexbuffers.h:24,
                           from include/flatbuffers/idl.h:26,
                           from include/flatbuffers/code_generators.h:22,
                           from src/code_generators.cpp:17:
          include/flatbuffers/util.h: In function ‘int flatbuffers::FromUTF8(const char**)’:
          include/flatbuffers/util.h:325:44: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
             if ((static_cast<const unsigned char>(tmp) << len) & 0x80) return -1;  // Bit after leading 1's must be 0.
                                                  ^
          cc1plus: all warnings being treated as errors
      
      This warning caught by gcc8:
      
          $ g++ --version
          g++ (GCC) 8.0.1 20180222 (Red Hat 8.0.1-0.16)
      6b3f057b
  17. 09 Mar, 2018 2 commits
  18. 08 Mar, 2018 2 commits
    • Montoli's avatar
      Swapped the order of two conditions in an assert. (#4663) · cc158e70
      Montoli authored
      An assert in flexbuffers was bit-shifting a 64-bit number by
      64 bits, which throws up warnings in some automated tools.
      
      The same assert also checks to see if the number of bytes
      being shifted is 8.  Swapped the order, so that the bitshift
      only occurs if the number of bits being shifted is not 64.
      
      Should be the same behavior, but plays nicer with diagnostic
      tools.
      cc158e70
    • desqaz's avatar
      Update .gitignore with Ninja stuff (#4659) · 5377957b
      desqaz authored
      5377957b
  19. 06 Mar, 2018 1 commit
  20. 05 Mar, 2018 2 commits
    • Wouter van Oortmerssen's avatar
      Added missing generated code files. · 3a62813f
      Wouter van Oortmerssen authored
      Change-Id: Ie1cab284cb6e0fe5bd2b2c293c3136c148927ac3
      3a62813f
    • Nik Hemmings's avatar
      Protobufs: Added '--oneof-union' option. (#4647) · fb94af88
      Nik Hemmings authored
      * Added '--oneof-union' option.
      
      Used with the .proto -> .fbs converter, will translate protobuff oneofs to flatbuffer unions.
      Updated proto test to check both methods of converting oneofs.
      
      * Added '--oneof-union' option.
      
      Used with the .proto -> .fbs converter, will translate protobuff oneofs to flatbuffer unions.
      Updated proto test to check both methods of converting oneofs.
      
      * FlatBuffers: Moved MakeCamel() into idl_parser.cpp
      
      Removes library dependency on Java/C# generator code.
      fb94af88