浏览代码

Removed obsolete TSRMLS_* usage. (#7731)

Joshua Haberman 5 年之前
父节点
当前提交
a28af654fa
共有 4 个文件被更改,包括 14 次插入18 次删除
  1. 1 1
      php/ext/google/protobuf/array.c
  2. 10 14
      php/ext/google/protobuf/def.c
  3. 1 1
      php/ext/google/protobuf/map.c
  4. 2 2
      php/ext/google/protobuf/message.c

+ 1 - 1
php/ext/google/protobuf/array.c

@@ -94,7 +94,7 @@ static void RepeatedField_destructor(zend_object* obj) {
   zend_object_std_dtor(&intern->std);
 }
 
-static HashTable *RepeatedField_GetProperties(zval *object TSRMLS_DC) {
+static HashTable *RepeatedField_GetProperties(zval *object) {
   return NULL;  // We do not have a properties table.
 }
 

+ 10 - 14
php/ext/google/protobuf/def.c

@@ -180,8 +180,7 @@ PHP_METHOD(EnumDescriptor, getValue) {
   zend_long index;
   zval ret;
 
-  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) ==
-      FAILURE) {
+  if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) {
     zend_error(E_USER_ERROR, "Expect integer for index.\n");
     return;
   }
@@ -284,8 +283,7 @@ PHP_METHOD(OneofDescriptor, getField) {
   zend_long index;
   zval ret;
 
-  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) ==
-      FAILURE) {
+  if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) {
     zend_error(E_USER_ERROR, "Expect integer for index.\n");
     return;
   }
@@ -615,8 +613,7 @@ PHP_METHOD(Descriptor, getField) {
   zval ret;
   zend_long index;
 
-  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) ==
-      FAILURE) {
+  if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) {
     zend_error(E_USER_ERROR, "Expect integer for index.\n");
     return;
   }
@@ -658,8 +655,7 @@ PHP_METHOD(Descriptor, getOneofDecl) {
   zend_long index;
   zval ret;
 
-  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) ==
-      FAILURE) {
+  if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) {
     zend_error(E_USER_ERROR, "Expect integer for index.\n");
     return;
   }
@@ -799,8 +795,8 @@ PHP_METHOD(DescriptorPool, getDescriptorByClassName) {
   zend_string *str;
   zval ret;
 
-  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &classname,
-                            &classname_len) == FAILURE) {
+  if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &classname, &classname_len) ==
+      FAILURE) {
     return;
   }
 
@@ -828,8 +824,8 @@ PHP_METHOD(DescriptorPool, getEnumDescriptorByClassName) {
   zend_string *str;
   zval ret;
 
-  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &classname,
-                            &classname_len) == FAILURE) {
+  if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &classname, &classname_len) ==
+      FAILURE) {
     return;
   }
 
@@ -856,8 +852,8 @@ PHP_METHOD(DescriptorPool, getDescriptorByProtoName) {
   zend_long protoname_len;
   const upb_msgdef *m;
 
-  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &protoname,
-                            &protoname_len) == FAILURE) {
+  if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &protoname, &protoname_len) ==
+      FAILURE) {
     return;
   }
 

+ 1 - 1
php/ext/google/protobuf/map.c

@@ -95,7 +95,7 @@ static zval *Map_GetPropertyPtrPtr(zval *object, zval *member, int type,
   return NULL;  // We don't offer direct references to our properties.
 }
 
-static HashTable *map_get_properties(zval *object TSRMLS_DC) {
+static HashTable *map_get_properties(zval *object) {
   return NULL;  // We do not have a properties table.
 }
 

+ 2 - 2
php/ext/google/protobuf/message.c

@@ -283,7 +283,7 @@ static zval *Message_get_property_ptr_ptr(zval *object, zval *member, int type,
  * Object handler for the get_properties event in PHP. This returns a HashTable
  * of our internal properties. We don't support this, so we return NULL.
  */
-static HashTable* Message_get_properties(zval* object TSRMLS_DC) {
+static HashTable *Message_get_properties(zval *object) {
   return NULL;  // We don't offer direct references to our properties.
 }
 
@@ -619,7 +619,7 @@ PHP_METHOD(Message, serializeToJsonString) {
   zend_bool preserve_proto_fieldnames = false;
   upb_status status;
 
-  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b",
+  if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b",
                             &preserve_proto_fieldnames) == FAILURE) {
     return;
   }