aboutsummaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2012-05-16 15:36:46 +0800
committerale <ale@FreeBSD.org>2012-05-16 15:36:46 +0800
commit6114ed6c930dcd43fd5cb27d2d7d14289eea1eca (patch)
tree049f29d0fa3337b52c7b68d0d6307cb0d91f4e32 /print
parent9e27ceefd8f71fd0a626c45800db7616e3a55f46 (diff)
downloadfreebsd-ports-gnome-6114ed6c930dcd43fd5cb27d2d7d14289eea1eca.tar.gz
freebsd-ports-gnome-6114ed6c930dcd43fd5cb27d2d7d14289eea1eca.tar.zst
freebsd-ports-gnome-6114ed6c930dcd43fd5cb27d2d7d14289eea1eca.zip
Fix for PHP 5.4.
Diffstat (limited to 'print')
-rw-r--r--print/pecl-pdflib/files/patch-pdf.c17
-rw-r--r--print/pecl-pdflib/files/patch-pdf7.c28
2 files changed, 45 insertions, 0 deletions
diff --git a/print/pecl-pdflib/files/patch-pdf.c b/print/pecl-pdflib/files/patch-pdf.c
new file mode 100644
index 000000000000..07deabf53bd5
--- /dev/null
+++ b/print/pecl-pdflib/files/patch-pdf.c
@@ -0,0 +1,17 @@
+--- pdf.c 2010/04/28 12:17:58 298698
++++ pdf.c 2012/01/28 03:05:18 322900
+@@ -766,10 +766,14 @@
+
+ ALLOC_HASHTABLE(intern->std.properties);
+ zend_hash_init(intern->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
++#if PHP_VERSION_ID < 50399
+ zend_hash_copy(intern->std.properties,
+ &class_type->default_properties,
+ (copy_ctor_func_t) zval_add_ref,
+ (void *) &tmp, sizeof(zval *));
++#else
++ object_properties_init( (zend_object*)intern, class_type );
++#endif
+
+ retval.handle = zend_objects_store_put(intern, NULL,
+ (zend_objects_free_object_storage_t)pdflib_object_dtor,
diff --git a/print/pecl-pdflib/files/patch-pdf7.c b/print/pecl-pdflib/files/patch-pdf7.c
new file mode 100644
index 000000000000..a3e768b0dfdb
--- /dev/null
+++ b/print/pecl-pdflib/files/patch-pdf7.c
@@ -0,0 +1,28 @@
+--- pdf7.c 2010/04/28 12:17:58 298698
++++ pdf7.c 2012/02/25 12:27:38 323503
+@@ -322,8 +322,9 @@
+ {
+ zend_object_value retval;
+ pdflib_object *intern;
++#if PHP_VERSION_ID < 50399
+ zval *tmp;
+-
++#endif
+
+ intern = emalloc(sizeof(pdflib_object));
+ memset(intern, 0, sizeof(pdflib_object));
+@@ -332,10 +333,14 @@
+
+ ALLOC_HASHTABLE(intern->std.properties);
+ zend_hash_init(intern->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
++#if PHP_VERSION_ID < 50399
+ zend_hash_copy(intern->std.properties,
+ &class_type->default_properties,
+ (copy_ctor_func_t) zval_add_ref,
+ (void *) &tmp, sizeof(zval *));
++#else
++ object_properties_init( (zend_object*)intern, class_type );
++#endif
+
+ retval.handle = zend_objects_store_put(intern, NULL,
+ (zend_objects_free_object_storage_t)pdflib_object_dtor,