aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/ext/grpc/timeval.h
diff options
context:
space:
mode:
authorGravatar thinkerou <thinkerou@gmail.com>2018-05-16 12:51:28 +0800
committerGravatar thinkerou <thinkerou@gmail.com>2018-05-16 12:51:28 +0800
commitfe037cb94c01930bc6d08d3fc3296956f6efb23b (patch)
tree872e8acb7cfaeb877e1c48c2294b5bb460323f96 /src/php/ext/grpc/timeval.h
parent100858d8098687d980a9afcf65baeb580e57a2ed (diff)
add two macro for reduce duplicate code
Diffstat (limited to 'src/php/ext/grpc/timeval.h')
-rw-r--r--src/php/ext/grpc/timeval.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/php/ext/grpc/timeval.h b/src/php/ext/grpc/timeval.h
index 23f5c1e971..6f8cc62264 100644
--- a/src/php/ext/grpc/timeval.h
+++ b/src/php/ext/grpc/timeval.h
@@ -29,24 +29,12 @@ PHP_GRPC_WRAP_OBJECT_START(wrapped_grpc_timeval)
gpr_timespec wrapped;
PHP_GRPC_WRAP_OBJECT_END(wrapped_grpc_timeval)
-#if PHP_MAJOR_VERSION < 7
-
-#define Z_WRAPPED_GRPC_TIMEVAL_P(zv) \
- (wrapped_grpc_timeval *)zend_object_store_get_object(zv TSRMLS_CC)
-
-#else
-
static inline wrapped_grpc_timeval
*wrapped_grpc_timeval_from_obj(zend_object *obj) {
return (wrapped_grpc_timeval*)((char*)(obj) -
XtOffsetOf(wrapped_grpc_timeval, std));
}
-#define Z_WRAPPED_GRPC_TIMEVAL_P(zv) \
- wrapped_grpc_timeval_from_obj(Z_OBJ_P((zv)))
-
-#endif /* PHP_MAJOR_VERSION */
-
/* Initialize the Timeval PHP class */
void grpc_init_timeval(TSRMLS_D);