php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #63038
Patch paradox-1.4.3_PHP54.patch revision 2012-09-07 17:36 UTC by pristine dot source at gmail dot com

Patch paradox-1.4.3_PHP54.patch for Paradox Bug #63038

Patch version 2012-09-07 17:36 UTC

Return to Bug #63038 | Download this patch
Patch Revisions:

Developer: pristine.source@gmail.com

diff -Naur paradox-1.4.3/paradox.c paradox-1.4.3_PHP54/paradox.c
--- paradox-1.4.3/paradox.c	2007-09-25 07:12:42.000000000 -0500
+++ paradox-1.4.3_PHP54/paradox.c	2012-09-07 12:25:27.064000000 -0500
@@ -48,7 +48,11 @@
  *
  * Every user visible function must have an entry in paradox_functions[].
  */
+#if ZEND_MODULE_API_NO >= 20100525
+zend_function_entry paradox_functions[] = {
+#else 
 function_entry paradox_functions[] = {
+#endif
 	PHP_FE(px_new, NULL)
 	PHP_FE(px_open_fp, NULL)
 	PHP_FE(px_create_fp, NULL)
@@ -88,8 +92,11 @@
 	{NULL, NULL, NULL}	/* Must be the last line in paradox_functions[] */
 };
 /* }}} */
-
+#if ZEND_MODULE_API_NO >= 20100525
+zend_function_entry paradox_funcs_db[] = {
+#else 
 function_entry paradox_funcs_db[] = {
+#endif
 	PHP_ME_MAPPING(__construct, px_new, NULL, 0)
 	PHP_ME_MAPPING(open_fp, px_open_fp, NULL, 0)
 	PHP_ME_MAPPING(create_fp, px_create_fp, NULL, 0)
@@ -280,11 +287,13 @@
     intern = emalloc(sizeof(paradox_object));
     memset(intern, 0, sizeof(paradox_object));
     intern->zo.ce = class_type;
-
-    ALLOC_HASHTABLE(intern->zo.properties);
-    zend_hash_init(intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
-    zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
-
+    
+    zend_object_std_init(&intern->zo, class_type TSRMLS_CC);
+#if ZEND_MODULE_API_NO >= 20100525
+    object_properties_init(&intern->zo, class_type);
+#else
+    zend_hash_copy  (intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_property_ctor, (void *) &tmp, sizeof(zval *));
+#endif
 	intern->ptr = PX_new2(px_custom_errorhandler, px_emalloc, px_erealloc, px_efree);
     retval->handle = zend_objects_store_put(intern, paradox_object_dtor, NULL, NULL TSRMLS_CC);
     retval->handlers = handlers;
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 05:01:26 2019 UTC