-
Notifications
You must be signed in to change notification settings - Fork 0
/
php-gnupg-1.3.2_PHP54.diff
59 lines (54 loc) · 2.3 KB
/
php-gnupg-1.3.2_PHP54.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff -Naur gnupg-1.3.2/gnupg.c gnupg-1.3.2_PHP54/gnupg.c
--- gnupg-1.3.2/gnupg.c 1970-01-01 03:13:08.000000000 -0600
+++ gnupg-1.3.2_PHP54/gnupg.c 2012-09-07 11:31:03.496000000 -0500
@@ -158,6 +158,10 @@
return;
}
gnupg_free_resource_ptr(intern TSRMLS_CC);
+
+#if ZEND_MODULE_API_NO >= 20100525
+ intern->zo.properties_table = NULL;
+#endif
if(intern->zo.properties){
zend_hash_destroy(intern->zo.properties);
FREE_HASHTABLE(intern->zo.properties);
@@ -175,12 +179,17 @@
intern = emalloc(sizeof(gnupg_object));
intern->zo.ce = class_type;
- intern->zo.properties = NULL;
- 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 *));
+ //object_properties_init
+
+
+ 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
retval.handle = zend_objects_store_put(intern,NULL,(zend_objects_free_object_storage_t) gnupg_obj_dtor,NULL TSRMLS_CC);
retval.handlers = (zend_object_handlers *) & gnupg_object_handlers;
gnupg_res_init (intern TSRMLS_CC);
diff -Naur gnupg-1.3.2/gnupg_keylistiterator.c gnupg-1.3.2_PHP54/gnupg_keylistiterator.c
--- gnupg-1.3.2/gnupg_keylistiterator.c 1970-01-01 03:13:08.000000000 -0600
+++ gnupg-1.3.2_PHP54/gnupg_keylistiterator.c 2012-09-07 11:33:14.440000000 -0500
@@ -54,6 +54,9 @@
/*
zval_dtor(&intern->pattern);
*/
+#if ZEND_MODULE_API_NO >= 20100525
+ intern->zo.properties_table = NULL;
+#endif
if(intern->zo.properties){
zend_hash_destroy(intern->zo.properties);
FREE_HASHTABLE(intern->zo.properties);
@@ -70,7 +73,8 @@
intern = emalloc(sizeof(gnupg_keylistiterator_object));
intern->zo.ce = class_type;
- intern->zo.properties = NULL;
+
+ zend_object_std_init(&intern->zo, class_type TSRMLS_CC);
retval.handle = zend_objects_store_put(intern,NULL,(zend_objects_free_object_storage_t) gnupg_keylistiterator_dtor,NULL TSRMLS_CC);
retval.handlers = (zend_object_handlers *) & gnupg_keylistiterator_object_handlers;