Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixbug: when call json_encode or toArray, fields of BYTES are encoded to zero. #51

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

48 changes: 0 additions & 48 deletions Rakefile

This file was deleted.

17 changes: 7 additions & 10 deletions config.m4
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
PHP_ARG_ENABLE(protocolbuffers, Whether to enable the "protocolbuffers" extension,
[ --enable-protocolbuffers Enable "protocolbuffers" extension support])
PHP_ARG_ENABLE(protocolbuffers, whether to enable protocolbuffers extension,
[ --enable-protocolbuffers Enable protocolbuffers extension support])

PHP_ARG_ENABLE(protocolbuffers-debug, for protocolbuffers debug support,
[ --enable-protocolbuffers-debug Enable enable protocolbuffers debug support], no, no)
PHP_ARG_ENABLE(protocolbuffers-debug, whether to enable protocolbuffers extension debug support,
[ --enable-protocolbuffers-debug Enable protocolbuffers extension debug support], no, no)

if test $PHP_PROTOCOLBUFFERS != "no"; then
if test "$PHP_PROTOCOLBUFFERS_DEBUG" != "no"; then
CFLAGS="$CFLAGS -Wall -g -ggdb -O0 -DPHP_PROTOCOLBUFFERS_DEBUG=1"
AC_DEFINE(PHP_PROTOCOLBUFFERS_DEBUG, 1, [Enable protocolbuffers debug support])
else
//CFLAGS="$CFLAGS -Wall -g -ggdb -O0 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement"
CFLAGS="$CFLAGS -Wall -g -ggdb -O0 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement"
fi

PHP_PROTOBUF_SRCS="protocolbuffers.c descriptor.c descriptor_builder.c field_descriptor.c message.c message_options.c enum.c enum_descriptor.c enum_value_descriptor.c enum_descriptor_builder.c php_message_options.c unknown_field.c unknown_field_set.c helper.c extension_registry.c core.c serializer.c json_serializer.c"

PHP_SUBST(PROTOCOLBUFFERS_SHARED_LIBADD)
PHP_NEW_EXTENSION(protocolbuffers, $PHP_PROTOBUF_SRCS, $ext_shared)
PHP_NEW_EXTENSION(protocolbuffers, protocolbuffers.c descriptor.c descriptor_builder.c field_descriptor.c message.c message_options.c enum.c enum_descriptor.c enum_value_descriptor.c enum_descriptor_builder.c php_message_options.c unknown_field.c unknown_field_set.c helper.c extension_registry.c core.c serializer.c json_serializer.c, $ext_shared)
PHP_ADD_EXTENSION_DEP(protocolbuffers, spl, true)

PHP_SUBST(PROTOCOLBUFFERS_SHARED_LIBADD)
PHP_SUBST([CFLAGS])
fi
Binary file removed contents/php-protocolbuffers.png
Binary file not shown.
Loading