Wouter van Oortmerssen
85f64786da
Reset minimum alignment when reusing FlatBufferBuilder
...
Previously, if you were re-using instances of FlatBufferBuilder
and an earlier buffer would use a 64bit item where later ones
do not, you could be wasting space.
Change-Id: Ic8090a38f97ce73194e991ba72bcfae74a7ace9f
Tested: on Linux.
2015-02-04 15:30:47 -08:00
Florian Enner
b0910e75e0
added reuse option for root objects
...
getRootAs..() function now has a second implementation that
accepts an existing object to allow object reuse, much like
all other methods that refer to objects.
Change-Id: Iffef567c903a130761ef7de98867e5465d29a04d
2015-02-04 15:30:07 -08:00
pjulien
4d3db99283
Issue #136
...
The satellite data of the ``ByteBuffer`` cannot be modified in
any way and stay thread safe in the presence of concurrent readers.
This implementation is simple and does introduce an allocation, however
without it multiple readers will quickly and continuously encounter
``IndexOutOfBoundsException`` exceptions.
An alternative, but possibly more controversial, implementation would
be to use ``Unsafe``. Using ``Unsafe``, it's possible to do an
array copy with a provided buffer index.
Change-Id: I851d4034e753b3be2931ee2249ec2c82dde43135
2015-02-04 13:53:02 -08:00
Florian Enner
72b9501e69
Added force-defaults to Java bindings
...
Change-Id: I62d10b639112788be3b0f670280bd50ef9fcf094
2015-02-02 14:04:22 -08:00
Florian Enner
9c169083ad
Added FlatBufferBuilder reuse
...
init resets internal variables, but keeps memory that has been allocated
for temporary storage
Change-Id: If2aa7d27de3c2717cf4c82b1e4e4b6732e495cea
2015-02-02 14:02:22 -08:00
Wouter van Oortmerssen
7bebaab69e
Added "raw struct" results to benchmark.
...
Change-Id: I95c550df7019645b02417259522c7049865997cc
Tested: on Windows.
2015-02-02 14:02:21 -08:00
Gabriel Martinez
d8117bb8a3
Merge "Add options to print build rule dependencies" into ub-games-master
2015-02-02 17:01:39 +00:00
Gabriel Martinez
df4909e5f6
Add options to print build rule dependencies
...
Tested: on Linux
Bug: 16465909
Change-Id: I2f1a6def13e47716110426b00990c2c625c03251
2015-01-28 11:27:05 -08:00
Wouter van Oortmerssen
79c2d80ed4
Fix for previous Java commit.
...
optimization would cause vtable fields from previous tables to be written.
Bug: 19046968
Change-Id: I781f7bcbceeaec0b499d4f1e4e5e8a1e750e0707
Tested: on Linux.
2015-01-26 14:12:20 -08:00
Wouter van Oortmerssen
3e1b789d21
Applied Java namespace filename fix to Go.
...
Bug: 19067493
Change-Id: Ib32fef963306e27834c15e3bbabc60570924c1a9
Tested: on Linux.
2015-01-26 13:45:33 -08:00
Wouter van Oortmerssen
cf7135ff58
Reducing garbage produced by Java serializer.
...
startObject() now only allocates a new vtable array when it needs to grow.
Tested: on Linux.
Change-Id: Idd041605afcb9487a34d63bda067172d797f437a
2015-01-26 13:35:20 -08:00
Wouter van Oortmerssen
f60276f54b
Fixed flatc not writing Java files without namespace.
...
If the schema didn't contain a namespace, paths would contain a
leading /, causing files not to be written.
Change-Id: I508772cbf6d18d464ef7d9f8842d0dbff14358a3
Tested: on Linux.
Bug: 19067493
2015-01-26 13:08:44 -08:00
pjulien
2b01247b30
PR for issue #130 . Improves the javadoc of ``FlatBufferBuilder``
...
and marks ``dataStart`` deprecated.
Change-Id: I48409e20948117c5cf17a1bfabecf64b033eab27
2015-01-26 13:08:44 -08:00
Hiroshi Matsunaga
7cf74cb864
cursor_ is not directly represent the hexadecimal
...
Change-Id: Ibdbd0e2f85284c1443403ed8c43acbd6e9de635f
2015-01-26 13:08:44 -08:00
Wouter van Oortmerssen
4fb5a764df
Support for booleans in the Java/C# API
...
Change-Id: I72e92183a7b5f4145ea51fcec29257dc9553a461
2015-01-26 13:08:44 -08:00
Wouter van Oortmerssen
6c2dc41e0d
Parser will allow a table or vector to have a trailing comma.
...
Unless in --strict-json mode.
Also added strict_json option to the parser, which in
addition controls if field names without quotes are allowed.
Change-Id: Id56fe5c780bdb9170958050ffa8fa23cf2babe95
Tested: on Linux.
2015-01-21 11:18:01 -08:00
Wouter van Oortmerssen
e568f17096
Fixed C# SizedByteArray copying leading bytes of ByteBuffer.
...
Tested: on Windows.
Change-Id: I946dacf799eae835ec041ea759622f74b0384937
2015-01-16 15:36:25 -08:00
Patrick Julien
1263e9788e
Add a simple Maven file modeled after
...
https://github.com/google/protobuf/blob/master/java/pom.xml
This isn't good enough to publish to Maven Central but will at
least allow users to publish to their local maven repository
using 'mvn install'
Change-Id: I91ea146cf7c5263fcf5d9823f70bb1ef0158f9a6
Tested: 'mvn install' runs succesfully and produces a .jar
2015-01-16 11:39:23 -08:00
Patrick Julien
f5132b9ee1
Ignore intellij files
...
Change-Id: I34ea778fc791ecce3a8948de51dea6fe4389a3c6
2015-01-16 11:09:06 -08:00
Patrick Julien
c95ad9cc55
Reuse the same charset instance
...
Change-Id: I58b411a2c0f1ee6b856d5b1eaa42787036da1384
2015-01-16 11:05:58 -08:00
Wouter van Oortmerssen
3550899987
Sorted Vector & binary search functionality.
...
Bug: 16659276
Tested: on Linux & Windows.
Change-Id: Ie7a73810345fad4cf0a3ad03dfaa5464e3ed5ac8
2015-01-16 10:59:52 -08:00
Wouter van Oortmerssen
73582b145c
Fixed C# showing up as C in the documentation
...
Change-Id: Id1cc75cee07fa2d3de3e7d346f6e2641e4692968
2015-01-07 16:30:10 -08:00
Wouter van Oortmerssen
b929c62c71
Added clarification about unions in JSON to the docs.
...
Change-Id: I1f310636f8b74366b5b0fc73c7e106424583fc93
2015-01-07 15:42:43 -08:00
Leander Bessa Beernaert
3ec8d7f598
Added option FLATBUFFERS_BUILD_FLATC
...
When FLATBUFFERS_BUILD_FLATC is set to OFF, the flatbuffer compiler
and tests will not be build.
Change-Id: I42b87b71daab4cb9c06605c813e7e4b62d6bf67a
2015-01-07 15:41:59 -08:00
Wouter van Oortmerssen
352b743c71
Union verification functions were not correctly namespaced.
...
Bug: 18908613
Change-Id: Ifed8a33b6b976b64eed9d190d930b08de1d5f41e
Tested: on Linux.
2015-01-07 13:37:25 -08:00
Wouter van Oortmerssen
b7cb91c34e
Made CreateUninitializedVector return the buffer.
...
Previously, obtaining the buffer was unclear and required multiple
casts.
Change-Id: I18e01c9e669886ac250e83aad10623cbddd629b6
Tested: on Linux.
2015-01-07 13:37:25 -08:00
Wouter van Oortmerssen
f79cc460f8
Merge changes Id7618e53,Ieddc3c5c into ub-games-master
...
* changes:
non-generic version of CreateUninitializedVector for c ffi
cast literal to csize to fix error
2015-01-07 19:25:59 +00:00
Jon Simantov
757854a6cd
Merge "C#: Allow ByteBuffer to use faster unsafe mode" into ub-games-master
2015-01-07 19:07:03 +00:00
dyu
6f4b4c80a7
non-generic version of CreateUninitializedVector for c ffi
...
Change-Id: Id7618e53797a158b82e7e480a6507887db3528bc
2015-01-07 10:47:26 -08:00
dyu
ae1763e226
cast literal to csize to fix error
...
Change-Id: Ieddc3c5cd4f7c97a9739ae3046b8a1b328180ae1
2015-01-07 10:47:19 -08:00
dyu
aa46f0e4c2
update generated sources
...
Change-Id: I531c26572fca7fca9805178971d7e110d44627d8
2015-01-07 10:34:17 -08:00
Wouter van Oortmerssen
89d2b0861b
Documentation clarifications.
...
Change-Id: I7dc4bb3bbe32c6fe83a013790391fba0df8f4888
2015-01-07 10:34:17 -08:00
Jon Simantov
4390254e6a
C#: Allow ByteBuffer to use faster unsafe mode
...
If your C# runtime environment supports unsafe mode, you can use
the #define UNSAFE_BYTEBUFFER setting and build the FlatBuffers assembly
in unsafe mode for greatly increased performance.
Tested: Tested FlatBuffersTest on Windows using VS2010 with both safe
and unsafe versions. Added ByteBufferTest to test the byte reversing
functions.
Change-Id: I21334468b339334f9abf4317e6291b648b97f57b
2015-01-06 12:39:17 -08:00
Wouter van Oortmerssen
3a27013732
Merge "Added CONTRIBUTING.md file." into ub-games-master
2014-12-09 02:03:07 +00:00
Wouter van Oortmerssen
d72c478128
Merge "Added VectorLength helper function that works on nullptr." into ub-games-master
2014-12-09 02:01:31 +00:00
Wouter van Oortmerssen
10f4ecac26
Merge "Fixed missing virtual destructor in allocator." into ub-games-master
2014-12-09 02:01:21 +00:00
Wouter van Oortmerssen
27823d5552
Merge "Fixed Java ByteBuffer accessors generated for non-scalar vectors." into ub-games-master
2014-12-09 02:01:12 +00:00
Wouter van Oortmerssen
19361a58ec
Merge "Generate C++ function returning the file_identifier of a flatbuffer" into ub-games-master
2014-12-09 02:00:58 +00:00
Wouter van Oortmerssen
c6c8a9ba29
Merge "Various documentation clarifications." into ub-games-master
2014-12-09 02:00:47 +00:00
Wouter van Oortmerssen
14eaddfdcc
Added CONTRIBUTING.md file.
...
Change-Id: Ie187065698dfb6ba9d989e9d2c48bdd7cb870e89
2014-12-08 17:48:06 -08:00
Wouter van Oortmerssen
8833cff911
Added VectorLength helper function that works on nullptr.
...
Change-Id: Ie62096f7337a476bee7a6d46d652e594fb3124d2
Tested: on Linux.
Bug: 18201051
2014-12-08 17:32:26 -08:00
Wouter van Oortmerssen
318668aed6
Fixed missing virtual destructor in allocator.
...
Change-Id: I458249d95e6d65ac039e84d947d2fdf4fd1c3809
Tested: on Linux.
2014-12-08 17:19:29 -08:00
Wouter van Oortmerssen
9566669245
Fixed Java ByteBuffer accessors generated for non-scalar vectors.
...
Change-Id: I9787ab88e5bd4846d92995e2bb05d0c2121113ca
Tested: on Linux.
2014-12-08 17:14:38 -08:00
Lars Magnusson
354fd906a5
Generate C++ function returning the file_identifier of a flatbuffer
...
Change-Id: I6ee09cf1e86a41b73bb3aa79b68871afb1a4e34f
2014-12-08 17:00:56 -08:00
Wouter van Oortmerssen
2d9b3ade18
Various documentation clarifications.
...
Change-Id: Ibc2bd88a636f3b4abf82a7c2722fc1e354dab848
Tested: on Linux.
2014-12-08 16:47:00 -08:00
Robert Segal
ced2cb6ce9
[fix] removed some source files included multiple times causing duplicate symbol compilation errors
...
Change-Id: I72aa590a0dc13771ca2f17857824f8b6fd76c78f
2014-12-08 16:29:15 -08:00
Wouter van Oortmerssen
285501f7be
Added "final" to generated types to block inheritance.
...
People sometimes accidentally inherit from these types.
Bug: 18224703
Change-Id: Ia09489a834ac4941f9b4a46f240cbdcf456f03a1
Tested: on Windows and Linux.
2014-11-19 13:41:15 -08:00
Wouter van Oortmerssen
0952143971
Added user defined attribute declarations.
...
This is such that if you mis-spell an attribute, it doesn't get
silently ignored.
Bug: 18294628
Change-Id: I10013f5b2a21048b7daba2e9410678f528e09761
Tested: on Linux.
2014-11-19 11:06:17 -08:00
Wouter van Oortmerssen
0ce53c96c3
Clarified note on multi-threading in the docs.
...
Change-Id: Ib36ec71aab02fc66d2a6d0c916ebfa4dd1d0d02f
2014-11-19 11:06:17 -08:00
Jon Simantov
d6f70cdd7d
Fix FlatBuffersTest build on Android by adding missing file.
...
Change-Id: I5333d45ac43cbba61473bd8ba5b44aedb696a25c
Tested: FlatBuffersTest now builds on Android under Windows.
2014-11-19 10:57:34 -08:00