platform/upstream/flatbuffers.git
6 years agoFixed TypeScript links in docs (#4783)
Kamil Rojewski [Tue, 12 Jun 2018 18:37:10 +0000 (20:37 +0200)]
Fixed TypeScript links in docs (#4783)

* 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#

* Missing TypeScript doc processing

6 years agoDart: Generate the enum from 0 if value is null and fix inconsistent naming when...
Woody Guo [Tue, 12 Jun 2018 18:35:40 +0000 (02:35 +0800)]
Dart: Generate the enum from 0 if value is null and fix inconsistent naming when generating object builder (#4782)

* Dart: Generate the enum from 0 if value is null

* Dart: Fix inconsistent naming when generating object builder

6 years agoRe-enable clang / os x in .travis
Wouter van Oortmerssen [Fri, 8 Jun 2018 18:10:41 +0000 (11:10 -0700)]
Re-enable clang / os x in .travis

Change-Id: I45f6326f1b7da2d83eeee72fe44fd9626a288b5b

6 years agoRemoved biicode from repo.
Wouter van Oortmerssen [Fri, 8 Jun 2018 18:03:34 +0000 (11:03 -0700)]
Removed biicode from repo.

Change-Id: I8b517fb8eaf02772052d95ca55bdaa0efbffa65a

6 years agoAdded missing Dart generated files.
Wouter van Oortmerssen [Fri, 8 Jun 2018 17:59:46 +0000 (10:59 -0700)]
Added missing Dart generated files.

Change-Id: I27986e8aaf2f672145af9beae6ab659b272c9721

6 years agoPython: Escape enum member names if they correspond to a Python keyword (#4772)
Michael Seifert [Fri, 8 Jun 2018 17:55:19 +0000 (19:55 +0200)]
Python: Escape enum member names if they correspond to a Python keyword (#4772)

* Python: Generated enum member names are now escaped if they correspond to a Python keyword.

* Keyword list in Python generator is now a const char* instead of an std::string array.

* Moved static functions and keyword list of Python generator into the PythonGenerator class.

* Python generator escapes keyword identifiers in all definitions.

6 years agoPython: fix default bool value. (#4773)
Tin Tvrtković [Thu, 7 Jun 2018 19:02:35 +0000 (21:02 +0200)]
Python: fix default bool value. (#4773)

* Python: fix default bool value.

* Small style tweak.

6 years agoEnforcing CreateUninitializedVector is only used with scalars.
Wouter van Oortmerssen [Thu, 7 Jun 2018 15:48:15 +0000 (08:48 -0700)]
Enforcing CreateUninitializedVector is only used with scalars.

This function cannot work with any offset types (since offsets
must always point forward) so this avoid possible mistakes.

Change-Id: I1b3dfbefc8d40da630345b9b04f9aff4a990e8e5

6 years agoMakes VectorIterator compatible with STL iterators. (#4768)
Vladimir Glavnyy [Mon, 4 Jun 2018 19:02:08 +0000 (02:02 +0700)]
Makes VectorIterator compatible with STL iterators. (#4768)

6 years agoFix a small problem with add_subdirectory(${FLATBUFFERS_DIR}) from top level project...
Vladimir Glavnyy [Fri, 1 Jun 2018 15:22:17 +0000 (22:22 +0700)]
Fix a small problem with add_subdirectory(${FLATBUFFERS_DIR}) from top level project. (#4764)

6 years agorenamed flexbuffers::Type enum values TYPE_ -> FBT_ (#4761)
Christian Helmich [Thu, 31 May 2018 18:06:44 +0000 (03:06 +0900)]
renamed flexbuffers::Type enum values TYPE_ -> FBT_ (#4761)

reason: TYPE_BOOL is a macro defined in some iOS build configurations.

6 years agoFixed typo in Java/C# tutorial.
Wouter van Oortmerssen [Thu, 31 May 2018 16:53:47 +0000 (09:53 -0700)]
Fixed typo in Java/C# tutorial.

Change-Id: I956b27f37b11988e67d0403a596c0569eacbfc2a

6 years agoFixed ASAN false positive.
Wouter van Oortmerssen [Thu, 31 May 2018 16:48:34 +0000 (09:48 -0700)]
Fixed ASAN false positive.

Change-Id: I79d9b2cddc61df5919bc4a93627fba2aa69e5d49
Tested: on Linux.

6 years agoadds https to landing page link so it resolves (#4757)
Steve Barman [Thu, 31 May 2018 16:37:51 +0000 (12:37 -0400)]
adds https to landing page link so it resolves (#4757)

6 years agoFix typo in tutorial for Go (#4756)
Gautham B A [Thu, 31 May 2018 16:17:34 +0000 (21:47 +0530)]
Fix typo in tutorial for Go (#4756)

Fixed a typo in serialising the inventory for Orc.

6 years agoJavascript: Add suppport for ES6 style exports (#4754)
Nathan Mitchell [Thu, 31 May 2018 15:29:58 +0000 (08:29 -0700)]
Javascript: Add suppport for ES6 style exports (#4754)

* Add suppport for ES6 style exports

Adds support for ECMAScript 6 module exports during Javascript
generation. This is useful as many development projects are
switching to this new standard and away from custom module
solutions. By integrating support into flatbuffers, users
do not need to perform additional post-processing of generated
files in order to use flatbuffers output directly in their
codebases.

Reference to ECMAScript 6 modules:
https://www.ecma-international.org/ecma-262/6.0/#sec-exports

Changes:
* Added `--es6-js-export` option to cli parser tool
* Added conditional code to generate a ES6 style export
  line, replacing the normal NodeJS/RequireJS line.

* Fixed missing export statements

Added exports for definition and struct names that were not inside namespaces

* Updated Compiler.md with new generator option

Added entry to Compiler.md in docs for the `--es6-js-export` flag, including a brief description of the effects and usefulness.

6 years agoChanged how the default allocator is handled.
Wouter van Oortmerssen [Fri, 18 May 2018 18:54:39 +0000 (11:54 -0700)]
Changed how the default allocator is handled.

This is to not need static variables, which could trip up users
with destruction order problems.

This potentially makes these operations slightly slower, but I
think they're infrequent enough that this should not be noticable.

Also there is one breaking API change, for a method that is not
used by any code in FlatBuffers and is assumed to affect very
few if any users. A namechange and comment ensures that those
affected, if any, will not run into trouble silently.

Change-Id: I16c1352d1dfc9092c816ddb7e353ed7f5f417444
Tested: on Linux.

6 years agoFix of namespace problem described in #4747 (#4752)
Vitaly Bondar [Fri, 18 May 2018 19:21:08 +0000 (22:21 +0300)]
Fix of namespace problem described in #4747 (#4752)

6 years agoAdd [Dart] support (#4676)
Dan Field [Fri, 18 May 2018 18:06:15 +0000 (14:06 -0400)]
Add [Dart] support (#4676)

* 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

6 years agoFix undertermined execution behavior (#4751)
joligarson [Fri, 18 May 2018 16:15:20 +0000 (18:15 +0200)]
Fix undertermined execution behavior (#4751)

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.

6 years ago[BREAKING CHANGE] Python: handle bool table fields properly. (#4736)
Tin Tvrtković [Mon, 14 May 2018 20:30:10 +0000 (22:30 +0200)]
[BREAKING CHANGE] Python: handle bool table fields properly. (#4736)

* Python: handle bool table fields properly.

* Small refactor.

* Use snake_case instead of camelCase. Use auto.

6 years agoVector of unions support for java and c# (#4735)
Kamil Rojewski [Mon, 14 May 2018 18:12:24 +0000 (20:12 +0200)]
Vector of unions support for java and c# (#4735)

* 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#

6 years agoSet Working Directory for flatc commands (#4737)
Keef Aragon [Mon, 14 May 2018 16:20:49 +0000 (09:20 -0700)]
Set Working Directory for flatc commands (#4737)

6 years agoAdd define/ifdef blocks, alternate sprintf implementation via FLATBUFFERS_PREFER_PRIN...
Paul Reimer [Thu, 10 May 2018 20:31:02 +0000 (13:31 -0700)]
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

6 years agoAdd string view [C++] (#4730)
Paul Reimer [Thu, 10 May 2018 20:30:35 +0000 (13:30 -0700)]
Add string view [C++] (#4730)

* 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

6 years agoPython: return None for missing strings. (#4733)
Tin Tvrtković [Thu, 10 May 2018 17:34:20 +0000 (19:34 +0200)]
Python: return None for missing strings. (#4733)

[BREAKING CHANGE] Python: return None for missing strings.

6 years agoRemove @Nullable (Java) for required fields (fixes #4724) (#4726)
Mike Mansell [Thu, 10 May 2018 16:27:23 +0000 (09:27 -0700)]
Remove @Nullable (Java) for required fields (fixes #4724) (#4726)

@Nullable is only a compiler informational attribute.
Removing for required fields improves compiler warnings
but doesn't impact any running code.

6 years agoAdd --root-type option to flatc [C++, parser, JSON] (#4728)
Paul Reimer [Mon, 7 May 2018 23:07:52 +0000 (16:07 -0700)]
Add --root-type option to flatc [C++, parser, JSON] (#4728)

* Add --root-type option to flatc

To select or override a root_type

* Add help text from flatc --root-type to Compiler.md doc

6 years agoSeveral pom.xml files did not have their version bumped to 1.9.0
Wouter van Oortmerssen [Mon, 7 May 2018 15:46:34 +0000 (08:46 -0700)]
Several pom.xml files did not have their version bumped to 1.9.0

Change-Id: I7c9bb5406ae8df951afe12a008f0d071e0195bfa

6 years agoOutput JSON strings as natural UTF-8 text without escapes (#4710)
Vladimir Glavnyy [Thu, 3 May 2018 19:10:45 +0000 (02:10 +0700)]
Output JSON strings as natural UTF-8 text without escapes (#4710)

* Added support for the non-escaped print of utf-8 string.

* EscapeString: the first invalid symbol resets print_natural_utf8 flag to false.

* Move the test to ParseAndGenerateTextTest. Fixes.

* Removed dependence between `natural_utf8` and `allow_non_utf8` flags.

6 years agoFix union escaping order. (#4722)
iceboy [Thu, 3 May 2018 18:59:30 +0000 (11:59 -0700)]
Fix union escaping order. (#4722)

* Fix union escaping order.

Fixes #4712

* style

6 years agoDelete ByteBuffer.exe (#4721)
iceboy [Thu, 3 May 2018 18:58:29 +0000 (11:58 -0700)]
Delete ByteBuffer.exe (#4721)

6 years agoAddition of Go FinishWithFileIdentifier (#4720)
husobee [Mon, 30 Apr 2018 21:37:24 +0000 (17:37 -0400)]
Addition of Go FinishWithFileIdentifier (#4720)

* 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

6 years agoInclude services in reflection data (fixes #4639) (#4713)
Tobias Oberstein [Fri, 27 Apr 2018 20:31:18 +0000 (22:31 +0200)]
Include services in reflection data (fixes #4639) (#4713)

* include service in reflection data (fixes #4639)

* changes from review

* regenerated test data

6 years agoAdding JS function to get the File Identifier (#4715)
Mark Henderson [Mon, 23 Apr 2018 19:54:20 +0000 (12:54 -0700)]
Adding JS  function to get the File Identifier (#4715)

* Adding JS  function to get the File Identifier

* Update flatbuffers.js

6 years agoThe asserts replaced by FLATBUFFERS_ASSERT. (#4701)
Vladimir Glavnyy [Mon, 16 Apr 2018 15:57:59 +0000 (22:57 +0700)]
The asserts replaced by FLATBUFFERS_ASSERT. (#4701)

* The asserts replaced by FLATBUFFERS_ASSERT. Several asserts have converted to static_asserts.

* Regenerate header monster generate_code.sh

6 years agoRemove unnecessary const qualifier (#4698)
Sergey Avseyev [Fri, 6 Apr 2018 18:33:07 +0000 (21:33 +0300)]
Remove unnecessary const qualifier (#4698)

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

6 years agoAn user-defined attribute name validation (#4689)
Vladimir Glavnyy [Fri, 6 Apr 2018 16:07:59 +0000 (23:07 +0700)]
An user-defined attribute name validation (#4689)

* User-declared attribute should be either identifier or string with the identifier.

* Attribute can be identifier or string in metadata.

6 years agoRename MANUALLY_ALIGNED_STRUCT to add FLATBUFFERS_ prefix in generated code within...
Paul Reimer [Thu, 5 Apr 2018 23:36:42 +0000 (16:36 -0700)]
Rename MANUALLY_ALIGNED_STRUCT to add FLATBUFFERS_ prefix in generated code within tests/. Via running `cd tests && sh generate_code.sh` (#4696)

6 years agoAdd FLATBUFFERS_ prefix to defines [C++] (#4695)
Paul Reimer [Thu, 5 Apr 2018 23:00:54 +0000 (16:00 -0700)]
Add FLATBUFFERS_ prefix to defines [C++] (#4695)

* 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`

6 years agoUpdate version number to 1.9 v1.9.0
Wouter van Oortmerssen [Thu, 5 Apr 2018 22:11:52 +0000 (15:11 -0700)]
Update version number to 1.9

Change-Id: I0b0ed43129c4d8fc88a177792df50adfeb52a1e3

6 years agoAdded missing generated code files.
Wouter van Oortmerssen [Thu, 5 Apr 2018 22:01:35 +0000 (15:01 -0700)]
Added missing generated code files.

Change-Id: I59af6ca1825870461c0badc7e7a045b97befdc1a

6 years agoMissing TS links in docs (#4693)
Kamil Rojewski [Thu, 5 Apr 2018 16:54:37 +0000 (18:54 +0200)]
Missing TS links in docs (#4693)

* 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

6 years agoRemove line break of CMakeLists.txt (#4691)
Juyeon Yoon [Thu, 5 Apr 2018 16:17:33 +0000 (01:17 +0900)]
Remove line break of CMakeLists.txt (#4691)

Fix #4650

6 years agoFix typos in C++ tutorial (#4685)
David Stephan [Mon, 2 Apr 2018 16:25:05 +0000 (09:25 -0700)]
Fix typos in C++ tutorial (#4685)

CreateMonster and MonsterBuilder examples fixed for C++

6 years agoFix for missing enum imports (#4683)
Kamil Rojewski [Mon, 26 Mar 2018 17:29:45 +0000 (19:29 +0200)]
Fix for missing enum imports (#4683)

* 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

6 years agoTypeScript docs (#4680)
Kamil Rojewski [Fri, 23 Mar 2018 16:01:39 +0000 (17:01 +0100)]
TypeScript docs (#4680)

* 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

6 years agoConst correctness in generated code and in code generators. Added missing \reflection...
Flaviu [Fri, 23 Mar 2018 15:58:07 +0000 (17:58 +0200)]
Const correctness in generated code and in code generators. Added missing \reflection\generate_code.bat file. (#4679)

6 years ago[C++, Go, Bazel]: Fix up Bazel support (#4672)
Andreas Bergmeier [Thu, 15 Mar 2018 19:31:16 +0000 (20:31 +0100)]
[C++, Go, Bazel]: Fix up Bazel support (#4672)

* Add Bazel support for Go library

* Make flatc compile again.

Was missing java_generator, which is now referenced from source.

6 years agoJava/C#/Python prefixed size support (#4445)
Robert Schmidtke [Mon, 12 Mar 2018 18:30:46 +0000 (19:30 +0100)]
Java/C#/Python prefixed size support (#4445)

* 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

6 years agoRemove unnecessary const qualifier from cast (#4666)
Sergey Avseyev [Mon, 12 Mar 2018 15:22:17 +0000 (18:22 +0300)]
Remove unnecessary const qualifier from cast (#4666)

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)

6 years agoConvert to unsigned char before applying bit shift operator (#4664)
ianXian [Fri, 9 Mar 2018 17:45:47 +0000 (09:45 -0800)]
Convert to unsigned char before applying bit shift operator (#4664)

* Convert to unsigned char before applying bit shift operator

* convert to const unsigned char inline

* convert to unsigned char inline

6 years agoJson : Add --size-prefixed option to flatc (#4645)
desqaz [Fri, 9 Mar 2018 16:21:28 +0000 (17:21 +0100)]
Json : Add --size-prefixed option to flatc (#4645)

to be able to convert to json size prefixed buffers.

6 years agoSwapped the order of two conditions in an assert. (#4663)
Montoli [Thu, 8 Mar 2018 22:18:41 +0000 (14:18 -0800)]
Swapped the order of two conditions in an assert. (#4663)

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.

6 years agoUpdate .gitignore with Ninja stuff (#4659)
desqaz [Thu, 8 Mar 2018 18:36:27 +0000 (19:36 +0100)]
Update .gitignore with Ninja stuff (#4659)

6 years agoFix broken Java/C# codegen
Wouter van Oortmerssen [Tue, 6 Mar 2018 00:37:04 +0000 (16:37 -0800)]
Fix broken Java/C# codegen

6 years agoAdded missing generated code files.
Wouter van Oortmerssen [Mon, 5 Mar 2018 23:47:16 +0000 (15:47 -0800)]
Added missing generated code files.

Change-Id: Ie1cab284cb6e0fe5bd2b2c293c3136c148927ac3

6 years agoProtobufs: Added '--oneof-union' option. (#4647)
Nik Hemmings [Mon, 5 Mar 2018 16:45:25 +0000 (16:45 +0000)]
Protobufs: Added '--oneof-union' option. (#4647)

* 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.

6 years agoMake nested flatbuffer lookup consistent. (#4656)
smillius [Mon, 5 Mar 2018 16:44:14 +0000 (17:44 +0100)]
Make nested flatbuffer lookup consistent. (#4656)

Lookup type of nested flatbuffer field with either raw name or fully qualified name as already done in the parser.
LookupCreateStruct tries both the raw name and the fully qualified one.
Without this, we cannot reference types outside of the current namespace, e.g. in a different module.

6 years agoSupport attribute "cpp_ptr_type" on table elements marked as "hash" (#4643)
Christian Helmich [Mon, 5 Mar 2018 16:40:56 +0000 (01:40 +0900)]
Support attribute "cpp_ptr_type" on table elements marked as "hash" (#4643)

* added intended use-cases to monster_test.fbs

* added check for `cpp_ptr_type` on hashed fields
added default value 'naked' to `cpp_ptr_type` on hashed fields

* added C++ generation of cpp_type vectors
removed ctor call for vector fields
added condition !vector for cpp_type check
added Pack() and UnPack() code generation for vector of hashes
added generation of correct resolve/rehash for cpp_type elements

* added attribute 'cpp_ptr_type_get' to hold accessor for pointer types possible where '.get()' does not work
use case: cpp_ptr_type:"std::weak_ptr", cpp_ptr_type_get:".lock().get()"

* run flatc to re-generate headers

* added bool param is_ctor to GetDefaultScalarValue() to differentiate between usage places

* modified monster_test.fbs to remove usage of shared_ptr/weak_ptr
reason: STLport does not support std::shared_ptr and std::weak_ptr

* run flatc again to re-generate headers

* fixed symbol unique_ptr not in namespace std when building with STLport

6 years agoJava + C#, reuse object in lookup_by_key (#4648)
Mitchel [Fri, 2 Mar 2018 23:22:46 +0000 (18:22 -0500)]
Java + C#, reuse object in lookup_by_key (#4648)

* Java + C#, reuse object in lookup_by_key

* Java + C#, reuse object in lookup_by_key

6 years agoFix for Java infinite loop encoding into 0-sized buffer (#4654)
Mitchel [Fri, 2 Mar 2018 23:21:08 +0000 (18:21 -0500)]
Fix for Java infinite loop encoding into 0-sized buffer (#4654)

6 years agomade HashFnv functions constexpr (#4640)
Christian Helmich [Fri, 2 Mar 2018 17:13:55 +0000 (02:13 +0900)]
made HashFnv functions constexpr (#4640)

* added FLATBUFFERS_CONSTEXPR_CPP14 define for C++14 and above constexpr

* made HashFnv functions constexpr (depending on FLATBUFFERS_CONSTEXPR)

6 years agoNot generating imports/ns prefixes with --gen-all (#4644)
Kamil Rojewski [Mon, 26 Feb 2018 16:56:04 +0000 (17:56 +0100)]
Not generating imports/ns prefixes with --gen-all (#4644)

* 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

6 years agoIn Java, allow reusing ByteBuffer in getters (#4633)
Mitchel [Fri, 23 Feb 2018 22:01:05 +0000 (17:01 -0500)]
In Java, allow reusing ByteBuffer in getters  (#4633)

* In Java, allow reusing ByteBuffer in getters

* In Java, allow reusing ByteBuffer in getters

* In Java, allow reusing ByteBuffer in getters

6 years agotemplate specialized Hash functions for 16-bit hash types (#4631)
Christian Helmich [Fri, 23 Feb 2018 18:29:37 +0000 (03:29 +0900)]
template specialized Hash functions for 16-bit hash types (#4631)

added access to HashFunction for 16 bit

6 years agoWhen Java raises a CharacterCodingException, the catch block rethrows this exception...
Philip S Doctor [Thu, 22 Feb 2018 22:54:35 +0000 (16:54 -0600)]
When Java raises a CharacterCodingException, the catch block rethrows this exception as a java.lang.Error.  Per the docs https://docs.oracle.com/javase/8/docs/api/java/lang/Error.html an Error is a serious problem that applications should not attempt to catch such as ThreadDeath.  In this case, it is reasonable for a consumer to try to catch this error as it likely indicates a problem with the underlying data. (#4630)

As Error does not inherit from Exception, a generic `catch(Exception ex)` will not catch this error.

A simple change from `Error` to `Exception` is not sufficient as an `Exception` is checked by the compiler, so in order to keep this issue unchecked, I am proposing raising a `RuntimeException` which is not checked, but is still a subclass of `Exception`.

The only possible breaking change would be if a consumer was explicitly catching `Error` already for this library.

https://github.com/google/flatbuffers/issues/4629

6 years agoadded support for parsing hash on vector elements (#4502)
Christian Helmich [Thu, 22 Feb 2018 19:04:26 +0000 (04:04 +0900)]
added support for parsing hash on vector elements (#4502)

* added support for parsing hash on vector elements

reversed check for scalar to check for vector

added C++ generation of cpp_type vectors

removed ctor call for vector fields
added condition !vector for cpp_type check

added Pack() and UnPack() code generation for vector of hashes

* schema change:
added table Referrable and weak references towards it from Monster

added single_weak_reference to Monster table
changed order with vector_of_weak_references

* re-generated monster schema dependent code

added Referrable.cs to FlatBuffers.Test.csproj

6 years agoAdd new c++ helpers to ease usage of size prefixed FlatBuffers (#4626)
desqaz [Thu, 22 Feb 2018 17:19:08 +0000 (18:19 +0100)]
Add new c++ helpers to ease usage of size prefixed FlatBuffers (#4626)

It was missing some helpers when we choose to use
size prefixed FlatBuffers.

* Add general helper : GetPrefixedSize
* Add generated helpers :
 * GetSizePrefixedXXX
 * VerfifySizePrefixedXXXBuffer
 * FinishSizePrefixedXXXBuffer

6 years ago[C++] better type mismatch error (#4623)
Masato Nagai [Fri, 16 Feb 2018 16:32:50 +0000 (01:32 +0900)]
[C++] better type mismatch error (#4623)

* better parse error

* pass str as a pointer instead of a reference for more efficient performance

6 years agoC++: mini_reflect: Add DefaultTypeTable (#4614)
Alexander Gallego [Thu, 15 Feb 2018 22:58:06 +0000 (17:58 -0500)]
C++: mini_reflect: Add DefaultTypeTable (#4614)

* mini_reflect: Add DefaultTypeTable

Currently it's very easy to make a mistake when it comes to
instantiating the TypeTable to print a buffer because it is not type
safe.

This will allow us to write safer cpp code:

flatbuffers::FlatBufferToString(reinterpret_cast<const uint8_t *>(&t),
                                decltype(t)::DefaultTypeTable());

* c++: mini_reflect: update generated code

* Ensure types and names are set for mini_reflect

* c++: mini_refelct: update unit tests with new typed TypeTable

* Adding PR feedback of sylte and naming convention

6 years agoSupport version compatibility checks via find_package command (#4625)
Dmitry Volosnykh [Thu, 15 Feb 2018 21:39:15 +0000 (00:39 +0300)]
Support version compatibility checks via find_package command (#4625)

6 years agoFix for aligned new for gcc >= 7.1 (#4621)
Kamil Rojewski [Mon, 12 Feb 2018 16:37:51 +0000 (17:37 +0100)]
Fix for aligned new for gcc >= 7.1 (#4621)

* 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

6 years agoFix vector_data failure under debug (#4606)
vglavnyy [Thu, 8 Feb 2018 23:15:17 +0000 (06:15 +0700)]
Fix vector_data failure under debug (#4606)

6 years agoMisc fixes from internal integration / clang tidy.
Wouter van Oortmerssen [Thu, 8 Feb 2018 22:56:16 +0000 (14:56 -0800)]
Misc fixes from internal integration / clang tidy.

Change-Id: Ic5e8f6a423b426abb9f8b90d39db0f85f28b94be
Tested: on Linux.

6 years agoFix compiler errors in parser (#4612)
Sergey Avseyev [Mon, 5 Feb 2018 20:04:55 +0000 (23:04 +0300)]
Fix compiler errors in parser (#4612)

src/idl_parser.cpp: In member function 'flatbuffers::CheckedError flatbuffers::Parser::ParseHexNum(int, uint64_t*)':
src/idl_parser.cpp:220:62: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
     if (!isxdigit(static_cast<const unsigned char>(cursor_[i])))
                                                              ^
src/idl_parser.cpp: In member function 'flatbuffers::CheckedError flatbuffers::Parser::Next()':
src/idl_parser.cpp:260:62: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
         if(!isdigit(static_cast<const unsigned char>(*cursor_))) return NoError();
                                                              ^
cc1plus: all warnings being treated as errors

6 years agoAdd initial Bazel WORKSPACE and BUILD (#4608)
Joe Schafer [Mon, 5 Feb 2018 18:23:15 +0000 (10:23 -0800)]
Add initial Bazel WORKSPACE and BUILD (#4608)

For #4574.

To test:

    bazel test --verbose_failures //:flatbuffers_test

6 years agoCleaned up & fixed buffer alignment handling.
Wouter van Oortmerssen [Mon, 29 Jan 2018 19:46:30 +0000 (11:46 -0800)]
Cleaned up & fixed buffer alignment handling.

- Fixed ForceVectorAlignment (and possibly other call-sites) not
  setting minalign_.
- Fixed flipped alignment parameters in CopyTable (reflection).
- Made aligment for FlatBufferBuilder internal buffer configurable
  (useful when reading a constructed buffer directly).
- Ensured Alignment rounding is always up.

Change-Id: I33ca4887d92a09cb11a369c14a109f4b07ae707a
Tested: on Linux.

6 years agoMade doubles output with higher precision in JSON and elsewhere.
Wouter van Oortmerssen [Mon, 22 Jan 2018 18:11:51 +0000 (10:11 -0800)]
Made doubles output with higher precision in JSON and elsewhere.

Change-Id: I5dd8f3a7c315c40b86a67aba5c2cca4d36363523
Tested: on Linux.

6 years agoRemoved truncating of enum vals to int in ReverseLookup.
Wouter van Oortmerssen [Mon, 22 Jan 2018 17:49:06 +0000 (09:49 -0800)]
Removed truncating of enum vals to int in ReverseLookup.

Some implementations (e.g. C++98) won't support 64-bit enum values,
but there is no reason to silently truncate them.

Change-Id: I8629563523a96e887068f9c0efcd53741f60e0d6
Tested: on Linux.

6 years agoFix the spell mistake (#4599)
Li-Deng [Mon, 22 Jan 2018 17:08:13 +0000 (01:08 +0800)]
Fix the spell mistake (#4599)

6 years agoFixed native_include not requiring a ; terminator.
Wouter van Oortmerssen [Mon, 22 Jan 2018 17:06:13 +0000 (09:06 -0800)]
Fixed native_include not requiring a ; terminator.

Change-Id: Ic4f49e94c67ba23f07e5ba7e87ca94e8db5d5906
Tested: on Linux.

6 years agoNew error: declaring an enum field without a default in range of the enum.
Wouter van Oortmerssen [Thu, 18 Jan 2018 20:06:01 +0000 (12:06 -0800)]
New error: declaring an enum field without a default in range of the enum.

Change-Id: I4db7f032440c00d31c7434975b8a3f17c29d74b9
Tested: on Linux.

6 years agoDisallow defaults on structs.
Wouter van Oortmerssen [Thu, 18 Jan 2018 19:41:43 +0000 (11:41 -0800)]
Disallow defaults on structs.

Change-Id: Ia098126c92ea6f8abe94561bd9c09b29ac8f61f5
Context: https://github.com/google/flatbuffers/issues/4591
Tested: on Linux.

6 years agoRemoved date/time from generated code, causing commit polution.
Wouter van Oortmerssen [Thu, 18 Jan 2018 19:21:10 +0000 (11:21 -0800)]
Removed date/time from generated code, causing commit polution.

Change-Id: I79724416110a3d2241d7eeecf0e12aa6d5b760a0

6 years agoAdded missing generated code.
Wouter van Oortmerssen [Thu, 18 Jan 2018 19:20:58 +0000 (11:20 -0800)]
Added missing generated code.

Change-Id: I9420bf01d2bdb6ccfe3703c835297be73457c0d7

6 years agoRemoved internal variable with name "data" inside a generated method _nested_root...
vglavnyy [Thu, 18 Jan 2018 19:15:31 +0000 (02:15 +0700)]
Removed internal variable with name "data" inside a generated method _nested_root(). Local variable with name "data" violates [-Werror=shadow]. (#4587)

6 years agoUse CreateVectorOfStructs when creating a vector of structs.
Wouter van Oortmerssen [Thu, 18 Jan 2018 19:06:38 +0000 (11:06 -0800)]
Use CreateVectorOfStructs when creating a vector of structs.

(mirrored from cl/180944741)

Change-Id: Ib9f1613ccc355528c5c495fd953a9b3944ecb4ce

6 years agoAuthor: Daniel Lin <danielin@umich.edi> (#4595)
Daniel Lin [Thu, 18 Jan 2018 16:51:57 +0000 (08:51 -0800)]
Author: Daniel Lin <danielin@umich.edi> (#4595)

Date:   Mon Jan 15 11:38:20 2018 -0200

Compilation failure with grpc.h

If cmake run with flag FLATBUFFERS_BUILD_GRPCTEST=ON
compilation fails.

Fix :
-Fix argument list for overriden function in grpc.
-Fix member function name called by FlatBufferBuilder from
buf() to scratch_data()

6 years agoCleaned up FlatBufferBuilder clearing.
Wouter van Oortmerssen [Tue, 16 Jan 2018 17:39:35 +0000 (09:39 -0800)]
Cleaned up FlatBufferBuilder clearing.

Change-Id: I81cf4d268670bdd11d1d56ca9f2de78c120df842
Tested: on Linux.

6 years ago#4522 Conan package support (#4590)
Uilian Ries [Fri, 12 Jan 2018 16:18:20 +0000 (14:18 -0200)]
#4522 Conan package support (#4590)

- Added Conan recipe to build Flatbuffers
- Added Travis job to create Conan package

Signed-off-by: Uilian Ries <uilianries@gmail.com>
6 years agoReduced FlatBufferBuilder from 3 buffers to 1
Wouter van Oortmerssen [Thu, 28 Dec 2017 22:38:04 +0000 (14:38 -0800)]
Reduced FlatBufferBuilder from 3 buffers to 1

Previously, FlatBufferBuilder used 3 resizable buffers:
- serialization (vector_downward)
- field offsets (std::vector)
- vtable offsets (std::vector)

Since the serialization buffer grows downwards, the bottom part of
it can be used as a "scratchpad" storage for the other two. Since
field offsets are only accumulated during table construction, and
vtable offsets only after table construction, the two can trivially
share the same storage.

Not only does this reduce the amount of allocation, it also removes
the bulk of std::vector usage from FlatBufferBuilder which was
the #1 cause of slow-down in debug mode, see e.g.:
https://stackoverflow.com/questions/36085285/any-way-to-improve-flatbuffer-performance-in-debug-c-msvc

Change-Id: I0224cf2f2a863d2d7ef762bc9163b52fdc149522
Tested: on Linux.

6 years agoAdd char * overload for FlatBufferBuilder::CreateString() (#4583)
Andrew Gunnerson [Mon, 8 Jan 2018 16:26:19 +0000 (11:26 -0500)]
Add char * overload for FlatBufferBuilder::CreateString() (#4583)

Without this change, the compiler tries to select the following overload
when CreateString is passed a `char *`:

    template<typename T>
    Offset<String> CreateString(const T &str) {
      return CreateString(str.c_str(), str.length());
    }

which is not valid since char pointers don't have methods.

(Fixes #4579)

Signed-off-by: Andrew Gunnerson <chenxiaolong@cxl.epac.to>
6 years agoPortable range check for *cursor_ value. (#4582)
brianhall77 [Fri, 5 Jan 2018 00:03:03 +0000 (16:03 -0800)]
Portable range check for *cursor_ value. (#4582)

Avoids the following compile error when char is unsigned:

error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-unsigned-zero-compare]

6 years agoGenerateText generate a text string for default identifier of enum and float scalar...
vglavnyy [Thu, 4 Jan 2018 18:12:18 +0000 (01:12 +0700)]
GenerateText generate a text string for default identifier of enum and float scalar. An enum identifier printed as the strictly quoted string. (#4527)

6 years agoRemove unused declarations (#4578)
Andrei Polushin [Thu, 4 Jan 2018 18:01:41 +0000 (01:01 +0700)]
Remove unused declarations (#4578)

6 years agoUpdate URL (#4576)
Darío Hereñú [Thu, 4 Jan 2018 17:10:03 +0000 (14:10 -0300)]
Update URL (#4576)

6 years agoFix error in ConCatPathFileName (#4575)
Bastien Brunnenstein [Thu, 4 Jan 2018 17:09:09 +0000 (18:09 +0100)]
Fix error in ConCatPathFileName (#4575)

6 years agonew maven jar called flatbuffers-java-grpc which contains utility … (#4558)
Yuri Finkelstein [Thu, 28 Dec 2017 23:26:29 +0000 (15:26 -0800)]
new maven jar called flatbuffers-java-grpc which contains utility … (#4558)

* new maven jar called flatbuffers-java-grpc which contains utility class supporting generated code for grpc over flatbuffers; grpc java unit test based on maven and junit (maven is used only for simplicity of testing); removed straneous namespace_test/NamespaceA/TableInC.java which is not longer used in the test and no longer generated but contains complilation errors if java compiler picks it up

* moved java grpc tests files according to review request

* Added missing generated code for Java gRPC.

Change-Id: Iada090fe2e99b80a4b7c2f8e39c838a992a1feae

* added missing name and url

6 years agoAdded missing nullptr check in vector of union verifiers.
Wouter van Oortmerssen [Thu, 28 Dec 2017 18:09:48 +0000 (10:09 -0800)]
Added missing nullptr check in vector of union verifiers.

Change-Id: Iec720991e68ad27580537135bfd8eb4159333921
Tested: on Linux.