Created
August 2, 2023 22:57
-
-
Save rlerdorf/c0a60307d91b4afd24ed74b8a479ee89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c | |
index 1abc4a3faf..7bc711be67 100644 | |
--- a/src/php/ext/grpc/call.c | |
+++ b/src/php/ext/grpc/call.c | |
@@ -451,7 +451,8 @@ PHP_METHOD(Call, startBatch) { | |
op_num++; | |
PHP_GRPC_HASH_FOREACH_END() | |
- error = grpc_call_start_batch(call->wrapped, ops, op_num, call->wrapped, | |
+ grpc_call *wrapped = call->wrapped; | |
+ error = grpc_call_start_batch(wrapped, ops, op_num, wrapped, | |
NULL); | |
if (error != GRPC_CALL_OK) { | |
zend_throw_exception(spl_ce_LogicException, | |
@@ -459,7 +460,7 @@ PHP_METHOD(Call, startBatch) { | |
(long)error TSRMLS_CC); | |
goto cleanup; | |
} | |
- grpc_completion_queue_pluck(completion_queue, call->wrapped, | |
+ grpc_completion_queue_pluck(completion_queue, wrapped, | |
gpr_inf_future(GPR_CLOCK_REALTIME), NULL); | |
zval *recv_md; | |
for (int i = 0; i < op_num; i++) { | |
@@ -624,5 +625,10 @@ void grpc_init_call(TSRMLS_D) { | |
INIT_CLASS_ENTRY(ce, "Grpc\\Call", call_methods); | |
ce.create_object = create_wrapped_grpc_call; | |
grpc_ce_call = zend_register_internal_class(&ce TSRMLS_CC); | |
+ zval property_channel_default_value; | |
+ ZVAL_NULL(&property_channel_default_value); | |
+ zend_string *property_channel_name = zend_string_init("channel", sizeof("channel") - 1, 1); | |
+ zend_declare_property_ex(grpc_ce_call, property_channel_name, &property_channel_default_value, ZEND_ACC_PROTECTED, NULL); | |
+ zend_string_release(property_channel_name); | |
PHP_GRPC_INIT_HANDLER(wrapped_grpc_call, call_ce_handlers); | |
} | |
diff --git a/src/php/ext/grpc/version.h b/src/php/ext/grpc/version.h | |
index 9382ac04d3..c864ee0292 100644 | |
--- a/src/php/ext/grpc/version.h | |
+++ b/src/php/ext/grpc/version.h | |
@@ -20,6 +20,6 @@ | |
#ifndef VERSION_H | |
#define VERSION_H | |
-#define PHP_GRPC_VERSION "1.49.3" | |
+#define PHP_GRPC_VERSION "1.56.0" | |
#endif /* VERSION_H */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment