瀏覽代碼

Remove V8JS_CONST preprocessor define

Stefan Siegl 8 年之前
父節點
當前提交
8668d28df3
共有 2 個文件被更改,包括 2 次插入10 次删除
  1. 0 8
      php_v8js_macros.h
  2. 2 2
      v8js_object_export.cc

+ 0 - 8
php_v8js_macros.h

@@ -66,14 +66,6 @@ extern "C" {
 #define V8JS_GET_CLASS_NAME(var, obj) \
 #define V8JS_GET_CLASS_NAME(var, obj) \
 	v8::String::Utf8Value var(obj->GetConstructorName());
 	v8::String::Utf8Value var(obj->GetConstructorName());
 
 
-/* method signatures of zend_update_property and zend_read_property were
- * declared as 'char *' instead of 'const char *' before PHP 5.4 */
-#if ZEND_MODULE_API_NO >= 20100525
-# define V8JS_CONST
-#else
-# define V8JS_CONST (char *)
-#endif
-
 /* Options */
 /* Options */
 #define V8JS_FLAG_NONE			(1<<0)
 #define V8JS_FLAG_NONE			(1<<0)
 #define V8JS_FLAG_FORCE_ARRAY	(1<<1)
 #define V8JS_FLAG_FORCE_ARRAY	(1<<1)

+ 2 - 2
v8js_object_export.cc

@@ -621,7 +621,7 @@ v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::String> property
 			if(!property_info ||
 			if(!property_info ||
 			   (property_info != ZEND_WRONG_PROPERTY_INFO &&
 			   (property_info != ZEND_WRONG_PROPERTY_INFO &&
 				property_info->flags & ZEND_ACC_PUBLIC)) {
 				property_info->flags & ZEND_ACC_PUBLIC)) {
-				zval *property_val = zend_read_property(NULL, &zobject, V8JS_CONST name, name_len, true, &php_value TSRMLS_CC);
+				zval *property_val = zend_read_property(NULL, &zobject, name, name_len, true, &php_value TSRMLS_CC);
 				// special case uninitialized_zval_ptr and return an empty value
 				// special case uninitialized_zval_ptr and return an empty value
 				// (indicating that we don't intercept this property) if the
 				// (indicating that we don't intercept this property) if the
 				// property doesn't exist.
 				// property doesn't exist.
@@ -656,7 +656,7 @@ v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::String> property
 				if(!property_info ||
 				if(!property_info ||
 				   (property_info != ZEND_WRONG_PROPERTY_INFO &&
 				   (property_info != ZEND_WRONG_PROPERTY_INFO &&
 					property_info->flags & ZEND_ACC_PUBLIC)) {
 					property_info->flags & ZEND_ACC_PUBLIC)) {
-					zend_update_property(scope, &zobject, V8JS_CONST name, name_len, &php_value TSRMLS_CC);
+					zend_update_property(scope, &zobject, name, name_len, &php_value TSRMLS_CC);
 					ret_value = set_value;
 					ret_value = set_value;
 				}
 				}
 				else if (ce->__set
 				else if (ce->__set