AddDescriptorsImpl() is a private static implementation detail,
and needs to be declared but won't be used from outside the
source file. Place it inside an anonymous namespace to fix a
previous build error that would result in more restrictive
build enviornments that use -Werror=missing-declarations or
similar compiler flags.
Treat missing declarations as an error for test builds, to prevent
future updates which add functions without properly declaring them.
This will prevent broken builds in more restrictive build environments.
An ifdef condition seems to have been inverted by mistake, causing the
dynamic initialization to occur for lite if and only if the
_NO_STATIC_INITIALIZER macro is set. This problem manifested itself as
segfaults due to uninitialized empty strings:
https://github.com/google/protobuf/issues/2839
Since no one complained about initialization not happening, it would
appear that we can just disable this initialization for lite
unconditionally, so that is what this change does. Instead of the
default instance initialization happening pre-main, it now always
happens lazily when needed.
Ran into an issue today where a machine had the `protoc` compiler but not the include files. Took a while to sort out, and this added note to the README included in every zip should help.
* Add php_generic_services option
* Generate PHP generic services
* Respect namespaces for generated PHP services
* Test PHP generated services
* Rename PHP generator service method doc comment function
* Correct phpdoc service method case
* Test namespaced PHP generic services
* Always use the FQCN for PHP generic service input/output
* Add generated_service_test to php test.sh
* Add php service test protos to CI
* Add php service files to php_EXTRA_DIST
* Use Interface suffix for php generic services
Both native_slot_merge and native_slot_merge_by_array have no return
type declared. GCC implicitly uses int as return type in such cases,
however, these functions are actually void.
Add some supporting documentation regarding Closure for those unfamiliar., Also substantiate details for "files in this directory" - including them all will result in a project that does not compile as some are used for test cases and aren't part of the core library.
In the generated code of previous versions, each php field is given an
initial value. In c extension, it was assumed that the field order in
the generated code is consistent with upb fields order, so that the
correct initial value can be bound to the correct upb field. However,
this may not be true. The order of fields in generated code is decided
by proto compiler, while the order of upb fields is decided by the hash
function used in c extension.
This PR fixes the issue by reset the initial value at runtime.
Add implementations of open(2), mkdir(2), stat(2),
etc. that support long paths under Windows (paths
longer than MAX_PATH in <windows.h>, which is 260
characters).
The implementations are in a separate namespace
(google::protobuf::internal::win32), so they won't
collide with the standard implementations in
<io.h>, but after importing them with `using` they
can be drop-in replacements.
Fixes https://github.com/bazelbuild/bazel/issues/2634
Fixes https://github.com/google/protobuf/issues/2891
Rather than crashing on use (doh!) better to just declare this platform
is missing a proper hash_map/hash_set implementation and use
the std::map/std::set emulation.
Fixes regression introduced by #1913