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()
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.
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>
Avoids the following compile error when char is unsigned:
error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-unsigned-zero-compare]
* 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
* grpc bindings generator for Java and a few minor supporting changes in improvements
* restored formatting before my previous changes for ease of review
* Fixed grpc java code generation bug resulting in duplicate extractor declarations in case the same is used in more than a single RPC method
* fixed previous merge issue
* removed extra space
* restored extra space
* restored extra space
* fixed java codegen bug documented in https://github.com/google/flatbuffers/issues/4563
* grpc bindings generator for Java and a few minor supporting changes in improvements
* restored formatting before my previous changes for ease of review
* Fixed grpc java code generation bug resulting in duplicate extractor declarations in case the same is used in more than a single RPC method
* updateed cpp_generator.cc to be compatible with the latest grpc version
* preserved the original license
* synchronized grpc cpp_generator with latest version as of today: GRPC 1.8.1. Regenerated test/monster_test.grpc.fb.* files and verified that grpctest is nicely passing
* fixed merge glitch
* 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
Use a combination of travis and twine to publish to PyPI. New
publications will be made:
* When `master` is updated. This will trigger the publication of a
the Python artifact versioned an iso-compliant build datetime. In this
way, the cutting edge version will always be available via PyPI.
* When a new git tag is pushed. Tag pushes trigger the publication of
a python artifact with the same version as the git tag, with the
leading `v` stripped if present (`v1.2.3` becomes `1.2.3`).
Publications rely on Travis having a PYPI_PASSWORD environment set in
the project settings. See the Travis CI documentation for information on
[setting environment variables which containing sensitive data][1]. Make
extra sure the "Display value in build log" switch is OFF.
In addition to setting the previously mentioned `PYPI_PASSWORD`
environment variable, the owner of the PyPI `flatbuffers` repository
should, after merging this commit into master, add his own commit to
change `mikeholler` in `.travis/deploy-python.sh` to his username. It's
also recommended that the owner of `flatbuffers` use a separate account
in the unlikely event that the environment variable somehow becomes
compromised. Again, this is very unlikely, since the environment
variable is only set for "safe" builds approved by maintainers (not on
random pull requests).
[1]: https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
* Remove copy constructor to make flatbuffers struct trivially copyable + add tests.
* Add support non c++11 compliant compilers.
* Fix std::trivially_copyiable test for non-C++11 compliant compilers.
* Fix trivially_copyable not part of glibc < 5 even with c++11 switch enabled.