aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/ext/grpc/channel.c
diff options
context:
space:
mode:
authorGravatar thinkerou <thinkerou@gmail.com>2016-07-28 22:43:38 +0800
committerGravatar thinkerou <thinkerou@gmail.com>2016-07-28 22:43:38 +0800
commit5dafd82b7ef99952889e0e862aac38b80595b15e (patch)
tree9603a9ad666a0946408a3b5a67c86b2f348f7be8 /src/php/ext/grpc/channel.c
parent514d296a5d463252dccf6d75a2c1cfed385eb07a (diff)
add macro PHP_GRPC_INIT_HANDLER
Diffstat (limited to 'src/php/ext/grpc/channel.c')
-rw-r--r--src/php/ext/grpc/channel.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c
index 1d3f68af7c..e96ead582f 100644
--- a/src/php/ext/grpc/channel.c
+++ b/src/php/ext/grpc/channel.c
@@ -256,11 +256,5 @@ void grpc_init_channel(TSRMLS_D) {
INIT_CLASS_ENTRY(ce, "Grpc\\Channel", channel_methods);
ce.create_object = create_wrapped_grpc_channel;
grpc_ce_channel = zend_register_internal_class(&ce TSRMLS_CC);
-#if PHP_MAJOR_VERSION >= 7
- memcpy(&channel_ce_handlers, zend_get_std_object_handlers(),
- sizeof(zend_object_handlers));
- channel_ce_handlers.offset =
- XtOffsetOf(wrapped_grpc_channel, std);
- channel_ce_handlers.free_obj = free_wrapped_grpc_channel;
-#endif
+ PHP_GRPC_INIT_HANDLER(wrapped_grpc_channel, channel_ce_handlers);
}