diff options
Diffstat (limited to 'pdflib.patch')
-rw-r--r-- | pdflib.patch | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/pdflib.patch b/pdflib.patch new file mode 100644 index 0000000..0aebc1f --- /dev/null +++ b/pdflib.patch @@ -0,0 +1,102 @@ +diff -up pdflib-3.0.2/pdf.c.orig pdflib-3.0.2/pdf.c +--- pdflib-3.0.2/pdf.c.orig 2013-12-19 13:51:07.000000000 +0100 ++++ pdflib-3.0.2/pdf.c 2013-12-19 13:52:23.000000000 +0100 +@@ -342,7 +342,6 @@ pdflib_object_new_ex(zend_class_entry *c + { + zend_object_value retval; + pdflib_object *intern; +- zval *tmp; + + intern = emalloc(sizeof(pdflib_object)); + memset(intern, 0, sizeof(pdflib_object)); +@@ -351,10 +350,13 @@ pdflib_object_new_ex(zend_class_entry *c + zend_object_std_init(&intern->std, class_type TSRMLS_CC); + + #if PHP_VERSION_ID < 50399 ++ { ++ zval *tmp; + zend_hash_copy(intern->std.properties, + &class_type->default_properties, + (copy_ctor_func_t) zval_add_ref, + (void *) &tmp, sizeof(zval *)); ++ } + #else /* PHP_VERSION_ID < 50399 */ + object_properties_init(&(intern->std), class_type); + #endif /* PHP_VERSION_ID < 50399 */ +@@ -670,7 +672,6 @@ PHP_FUNCTION(pdf_new) + { + PDF *pdf; + zval *object = getThis(); +- DEFINE_ERROR_HANDLER + pdflib_object *intern; + + +diff -up pdflib-3.0.2/php_pdf.h.orig pdflib-3.0.2/php_pdf.h +diff -up pdflib-3.0.2/php_pdflib.h.orig pdflib-3.0.2/php_pdflib.h +diff -up pdflib-3.0.2/php_wrapped.c.orig pdflib-3.0.2/php_wrapped.c +--- pdflib-3.0.2/php_wrapped.c.orig 2013-12-19 13:47:38.000000000 +0100 ++++ pdflib-3.0.2/php_wrapped.c 2013-12-19 13:50:21.000000000 +0100 +@@ -1455,7 +1455,7 @@ PHP_FUNCTION(pdf_begin_pattern) + } + RESTORE_ERROR_HANDLING(); + +- #if PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 3 ++ #if PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 3 && PDFLIB_MAJORVERSION >= 8 + php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "Deprecated, use PDF_begin_pattern_ext()."); + #endif /* PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 3 */ + +@@ -1469,6 +1469,7 @@ PHP_FUNCTION(pdf_begin_pattern) + /* }}} */ + + ++#if PDFLIB_MAJORVERSION >= 8 + /* {{{ proto int PDF_begin_pattern_ext( + resource p, double width, double height, string optlist) + * Start a pattern definition with options. */ +@@ -1515,6 +1516,7 @@ PHP_FUNCTION(pdf_begin_pattern_ext) + RETURN_LONG(_result); + } + /* }}} */ ++#endif + + + /* {{{ proto int PDF_begin_template( +@@ -9095,11 +9097,11 @@ PHP_FUNCTION(pdf_utf8_to_utf16) + PHP_FE(pdf_begin_page, NULL) + PHP_FE(pdf_begin_page_ext, NULL) + PHP_FE(pdf_begin_pattern, NULL) +- PHP_FE(pdf_begin_pattern_ext, NULL) + PHP_FE(pdf_begin_template, NULL) + PHP_FE(pdf_begin_template_ext, NULL) + PHP_FE(pdf_circle, NULL) + #if PDFLIB_MAJORVERSION >= 8 ++ PHP_FE(pdf_begin_pattern_ext, NULL) + PHP_FE(pdf_circular_arc, NULL) + #endif /* PDFLIB_MAJORVERSION >= 8 */ + PHP_FE(pdf_clip, NULL) +@@ -9353,11 +9355,11 @@ PHP_FUNCTION(pdf_utf8_to_utf16) + PDF_ME_MAPPING(begin_mc, pdf_begin_mc, NULL) + PDF_ME_MAPPING(begin_page_ext, pdf_begin_page_ext, NULL) + PDF_ME_MAPPING(begin_pattern, pdf_begin_pattern, NULL) +- PDF_ME_MAPPING(begin_pattern_ext, pdf_begin_pattern_ext, NULL) + PDF_ME_MAPPING(begin_template, pdf_begin_template, NULL) + PDF_ME_MAPPING(begin_template_ext, pdf_begin_template_ext, NULL) + PDF_ME_MAPPING(circle, pdf_circle, NULL) + #if PDFLIB_MAJORVERSION >= 8 ++ PDF_ME_MAPPING(begin_pattern_ext, pdf_begin_pattern_ext, NULL) + PDF_ME_MAPPING(circular_arc, pdf_circular_arc, NULL) + #endif /* PDFLIB_MAJORVERSION >= 8 */ + PDF_ME_MAPPING(clip, pdf_clip, NULL) +@@ -9602,11 +9604,11 @@ PHP_FUNCTION(pdf_begin_mc); + PHP_FUNCTION(pdf_begin_page); + PHP_FUNCTION(pdf_begin_page_ext); + PHP_FUNCTION(pdf_begin_pattern); +-PHP_FUNCTION(pdf_begin_pattern_ext); + PHP_FUNCTION(pdf_begin_template); + PHP_FUNCTION(pdf_begin_template_ext); + PHP_FUNCTION(pdf_circle); + #if PDFLIB_MAJORVERSION >= 8 ++PHP_FUNCTION(pdf_begin_pattern_ext); + PHP_FUNCTION(pdf_circular_arc); + #endif /* PDFLIB_MAJORVERSION >= 8 */ + PHP_FUNCTION(pdf_clip); |