aboutsummaryrefslogtreecommitdiff
path: root/php/ext/google/protobuf/protobuf.c
diff options
context:
space:
mode:
authorBo Yang <paulyang1211@gmail.com>2016-10-05 18:28:13 -0700
committerBo Yang <teboring@google.com>2016-10-10 11:44:54 -0700
commit63448e6059ee5e7b123e0d185e70c1df1d294bd8 (patch)
tree0ae4e5d5f68a5199d3594b972446a6566f4abc33 /php/ext/google/protobuf/protobuf.c
parent4f3d20a500e75ef47004986fece3db20ddeee43f (diff)
downloadprotobuf-63448e6059ee5e7b123e0d185e70c1df1d294bd8.tar.gz
protobuf-63448e6059ee5e7b123e0d185e70c1df1d294bd8.tar.bz2
protobuf-63448e6059ee5e7b123e0d185e70c1df1d294bd8.zip
Fix compile error for php on Mac.
Diffstat (limited to 'php/ext/google/protobuf/protobuf.c')
-rw-r--r--php/ext/google/protobuf/protobuf.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/php/ext/google/protobuf/protobuf.c b/php/ext/google/protobuf/protobuf.c
index d8ad3c88..019bca29 100644
--- a/php/ext/google/protobuf/protobuf.c
+++ b/php/ext/google/protobuf/protobuf.c
@@ -55,7 +55,7 @@ static void add_to_table(HashTable* t, const void* def, void* value) {
uint nIndex = (ulong)def & t->nTableMask;
zval* pDest = NULL;
- zend_hash_index_update(t, (zend_ulong)def, &value, sizeof(zval*), &pDest);
+ zend_hash_index_update(t, (zend_ulong)def, &value, sizeof(zval*), (void**)&pDest);
}
static void* get_from_table(const HashTable* t, const void* def) {
@@ -69,7 +69,7 @@ static void* get_from_table(const HashTable* t, const void* def) {
static void add_to_list(HashTable* t, void* value) {
zval* pDest = NULL;
- zend_hash_next_index_insert(t, &value, sizeof(void*), &pDest);
+ zend_hash_next_index_insert(t, &value, sizeof(void*), (void**)&pDest);
}
void add_def_obj(const void* def, zval* value) {
@@ -134,6 +134,8 @@ static PHP_RINIT_FUNCTION(protobuf) {
generated_pool = NULL;
generated_pool_php = NULL;
+
+ return 0;
}
static PHP_RSHUTDOWN_FUNCTION(protobuf) {
@@ -147,6 +149,8 @@ static PHP_RSHUTDOWN_FUNCTION(protobuf) {
zval_dtor(generated_pool_php);
FREE_ZVAL(generated_pool_php);
}
+
+ return 0;
}
static PHP_MINIT_FUNCTION(protobuf) {
@@ -158,10 +162,14 @@ static PHP_MINIT_FUNCTION(protobuf) {
descriptor_init(TSRMLS_C);
enum_descriptor_init(TSRMLS_C);
util_init(TSRMLS_C);
+
+ return 0;
}
static PHP_MSHUTDOWN_FUNCTION(protobuf) {
PEFREE(message_handlers);
PEFREE(repeated_field_handlers);
PEFREE(map_field_handlers);
+
+ return 0;
}