Commit Graph

395 Commits

Author SHA1 Message Date
Robert b4db88808f Merge pull request #286 from tguo-aa/fix-278
Add self.assertNotNested() in CreateString
2015-10-08 00:23:26 -07:00
tguo-aa d9db48257b Add self.assertNotNested() in CreateString
And also add a test case.
If you try to nest CreateString you will get a clear exception.
2015-09-29 08:34:10 +08:00
Wouter van Oortmerssen e1e1bced08 Fixed LoadFile on Windows 2015-09-28 16:24:34 -07:00
Wouter van Oortmerssen b56add9520 Improved documentation with links to videos, articles and who uses it.
Change-Id: I62de6b7008e397a5043d47f014a7acd83ee64740
2015-09-28 10:49:01 -07:00
Wouter van Oortmerssen 2abe24b9dd Made .proto parsing understand nested declarations.
Bug: 24401812
Change-Id: I196a03b8c5ef0bcd3c26178239c764e40ca1950d
Tested: on Linux.
2015-09-28 09:48:41 -07:00
Wouter van Oortmerssen a35c32e30f Merge pull request #282 from google/fix-277
Fix 32bit-system integer overflow (test only)
2015-09-25 14:54:50 -07:00
Robert 781c39c708 Fix 32bit-system integer overflow (test only)
For #277
2015-09-25 13:57:17 -07:00
Wouter van Oortmerssen ff9e539cc5 Merge pull request #280 from alexames/master
Removed call to pop_back on std::string.
2015-09-25 10:38:50 -07:00
Wouter van Oortmerssen feb4816610 Fixed .proto translation making scalars into required fields.
Change-Id: If414d156b4e9bc7fead5f131823b2c419cdc4e2c
Tested: on Linux.
2015-09-25 09:21:31 -07:00
Alex Ames 703b790939 Removed call to pop_back on std::string.
The pop_back function was added to strings in C++11 and it appears not
all compilers we target support it. The call to pop_back has been
replaced with a call to erase.

Tested on Linux. All unit tests pass.
2015-09-24 14:19:32 -07:00
Wouter van Oortmerssen 811a5c3389 Merge pull request #274 from cogumbreiro/master
Fix an out-of bounds read when the element is bigger than the buffer.
2015-09-23 12:37:45 -07:00
Robert 2736711d67 Merge pull request #275 from brunoqc/patch-1
Remove duplicate Go test
2015-09-21 15:13:24 -07:00
Bruno Bigras edb3b9c307 Remove duplicate Go test 2015-09-21 17:51:16 -04:00
Tiago Cogumbreiro 477fedccd4 Fix an out-of bounds read when the element is bigger than the buffer.
Ensure the size of the buffer being checked is bigger than the element
of the buffer being checked. The buffer can be triggered when, for
example, the buffer is of length zero and we are checking for:

    Verify<uoffset_t>(buf_)

The condition above should fail.
2015-09-18 20:38:47 -05:00
Björn Reimer 5de28c74f9 serialize boolean in JSON to "true/false" instead of "0/1"
Change-Id: I90cf519c00eaf9ccd9fcab8035a91b9205587c3b
2015-09-16 10:31:38 -07:00
Wouter van Oortmerssen 44261ccdf1 Merge pull request #271 from vijairaj/scoped-enums
Implemented option --scoped-enum for C++ generator
2015-09-16 10:14:49 -07:00
vijairaj c02b16e195 Implemented option --scoped-enum for C++ generator
This generates C++11 style scoped and strongly typed enums.
Enabling this option also implies --no-prefix.
2015-09-15 16:13:52 +05:30
Wouter van Oortmerssen 169df65df4 Merge pull request #266 from kadirahq/fix-travis-osx
Fix before_install step on .travis.yml file for osx
2015-09-14 17:50:29 -07:00
Wouter van Oortmerssen af1487bcfb Clarified use of unions in C++.
Change-Id: I9654e0c6a45457c8e150f07dd5f7b39539266f9e
2015-09-14 11:00:12 -07:00
Jason Sanmiya 5db12e9907 Fix Visual Studio 2012 build warning.
Also, remove execute permissions on several source files.

Tested: Builds on Visual Studio 2012, and Linux.

Change-Id: Idaacb2ae8eba98ce2974218c2ab840e97a1d67e9
2015-09-11 14:35:34 -07:00
Wouter van Oortmerssen dff07b6f31 Merge pull request #269 from teemuandersen/master
Add @SuppressWarnings("all") to generated Java classes
2015-09-11 14:23:53 -07:00
Teemu Andersén 5dd8795a10 Add @SuppressWarnings("unused") to generated Java classes
Usually generators add @SuppressWarnings("all") to generated Java
classes to prevent IDEs from complaining about unused imports, etc.
Solving used imports seems pretty hard with current generator logic so
IMO this is the next best thing.

Yes, it’s appended to import block but that is the block that gives
these warnings in the first place.
2015-09-11 23:33:55 +03:00
Muhammed Thanish be503cb0f2 Fix OSX related errors on travis
- Install g++ and cmake only on Linux.
 - Use biicode only on Linux machines.
2015-09-11 22:15:27 +05:30
Wouter van Oortmerssen 01e06b69a5 Improved the speed of LoadFile() in debug mode.
Apparently, istreambuf_iterator has a lot of overhead.

Change-Id: I804f4e8f2b380b05e939edefe0e1e88cd10e920c
Tested: on Linux.
2015-09-09 12:56:23 -07:00
Wouter van Oortmerssen 782e05de55 Fixed Android builds on Windows (generated schema rules).
include.mk causes absolute paths to be generated, which doesn't
work on Windows (make doesn't like : in paths).

Change-Id: Ib06c9581620bde1e8452e0dd887d3986d517c4f5
Tested: on Windows, Linux.
2015-08-28 14:42:13 -07:00
Wouter van Oortmerssen aeff09d724 Fixed a clang warning about signed shifts.
Change-Id: I7c2bf87972ee0ba6811d6ed42e13300bff90e36f
2015-08-26 16:47:59 -07:00
Björn Reimer a5c511576f Fix conversion of floats when generating json
Change-Id: I01def42eda9b70308046c048099d85db8f889ede
2015-08-26 14:06:29 -07:00
Maxim Zaks ac10873e26 fixed code generator for array of bools
Change-Id: I3cdd801b641bf180222203a37634598350d340e3
2015-08-19 14:39:06 -07:00
Robert 9689d38bef Merge pull request #235 from FrankStain/master
2Gb buffer size checks fixed for Python Builder
2015-08-19 23:22:20 +02:00
Wouter van Oortmerssen d06b2736aa Merge pull request #248 from aeneid/master
Added Java and C# mutators
2015-08-19 11:43:22 -07:00
Maor Itzkovitch a0f3fb44e7 rebase 2015-08-19 21:32:08 +03:00
Wouter van Oortmerssen d97f628703 Clarified choice of types in Java/C# codegen.
Change-Id: I1f094f350145d13b12cbe367bae7c623cfbbd8d3
2015-08-19 11:08:53 -07:00
Maor Itzkovitch fb7f27a7c9 Merge remote-tracking branch 'upstream/master' 2015-08-15 14:48:59 +03:00
Maor Itzkovitch 7bfed4b29a added vector mutators 2015-08-15 14:48:47 +03:00
Wouter van Oortmerssen a170b69d5d Added authors to support.md
Change-Id: I8f12e60d29a1c587d991bf64011bdf4a4b0d7e5b
2015-08-14 14:07:54 -07:00
Frank Stein 33e4ab65e9 Incorrect buffer size check fixed. 2015-08-14 00:50:39 +03:00
Wouter van Oortmerssen 201699288b Added a platform / language / feature support matrix to docs.
This is just a start, will need to be extended.

Change-Id: I5a9ad671911942dcb83fdd2bae537deed751cbfd
2015-08-12 12:07:43 -07:00
Wouter van Oortmerssen e9202d85bd Add missing Python files from type cast commit.
Change-Id: I800119d8fe19f4c3e95772aba629ef8b2deb9e4b
2015-08-12 10:17:10 -07:00
Wouter van Oortmerssen 9a1ab5006f Merge pull request #253 from mormegil-cz/issue-252
[Issue 252] Add type cast for default enum values in C#
2015-08-12 09:21:21 -07:00
Mormegil 25c99273d3 [Issue 252] Add type cast for default enum values in C#
When creating a “CreateXxx(...)” method for a “simple table” type,
enum-type fields with a non-zero default must have an explicit
cast for the respective argument default value, because in C#,
there is an implicit cast from int to an enum only for 0.

Also, added an example of such type into the example monster_test
type, so that we test this feature.
2015-08-11 18:07:38 +02:00
Frank Stein 7bcbb19569 MaxBufferSize() changed to MAX_BUFFER_SIZE. Also buffer will never grow more MAX_BUFFER_SIZE. 2015-08-07 21:19:02 +03:00
Maor Itzkovitch b062af4c8c rebased fork 2015-08-07 18:59:59 +03:00
Maor Itzkovitch 0956719726 added comments 2015-08-07 18:35:28 +03:00
Maor Itzkovitch 766eaad4e7 added a successful test run console print 2015-08-07 18:12:19 +03:00
Maor Itzkovitch 3a74c33ba5 removed console print from code 2015-08-07 10:57:37 +03:00
Maor Itzkovitch e4c3bf3d2c fixed C# bytebuffer put methods 2015-08-07 10:51:15 +03:00
Maor Itzkovitch 7196c36842 begin to correct C# bytebuffer behavior 2015-08-07 09:05:08 +03:00
Wouter van Oortmerssen e151160560 Added a link to other FPL libraries to the main page.
Change-Id: I45362806df6d4eff0b0b7521b7caf42c2ec0515c
2015-08-05 17:32:14 -07:00
Jon Simantov dac63a227e Fix missing break statement in SetAnyValueS case.
Causing SetAnyValueS to treat all scalars as integers.

Change-Id: Ib467b255e7f32a1478180a91e65def31676399eb
2015-08-05 16:06:47 -07:00
Wouter van Oortmerssen 986b52d849 Merge pull request #247 from stewartmiles/master
Clarified the use of the deprecated flatc --gen-includes flag.
2015-08-05 13:58:17 -07:00