divideInt64ToInt32 is called statically from protobuf/php/src/Google/Protobuf/Internal/CodedOutputStream.php
(the only reference)
This causes fatal error in PHP 7.1 (32-bit only because 64-bit doesn't use this function)
Both test_messages_proto3.proto & test_messages_proto2.proto define
message ForeignMessage {...} and enum ForeignEnum {...} but since
objc doesn't use the proto package in the naming, these end up
conflicting.
Adding the objc_class_prefix option to the proto3 file ensure the generated
objc types are all unique.
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.