[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] cvs: pecl /pdf config.m4 package.xml pdf.c
From:       "Rainer Schaaf" <rjs () php ! net>
Date:       2004-07-29 14:01:17
Message-ID: cvsrjs1091109677 () cvsserver
[Download RAW message or body]

rjs		Thu Jul 29 10:01:17 2004 EDT

  Modified files:              
    /pecl/pdf	config.m4 package.xml pdf.c 
  Log:
  - did not work with PHP versions before PHP-4.3.x
    (php_error_docref is used but not defined).
    build somtimes works fine, but the problem may
    appear during runtime.
  - pear install will work on Mac OS X now
  
  
  
http://cvs.php.net/diff.php/pecl/pdf/config.m4?r1=1.42&r2=1.43&ty=u
Index: pecl/pdf/config.m4
diff -u pecl/pdf/config.m4:1.42 pecl/pdf/config.m4:1.43
--- pecl/pdf/config.m4:1.42	Sat Jun 19 18:34:05 2004
+++ pecl/pdf/config.m4	Thu Jul 29 10:01:17 2004
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.42 2004/06/19 22:34:05 rjs Exp $
+dnl $Id: config.m4,v 1.43 2004/07/29 14:01:17 rjs Exp $
 dnl
 
 PHP_ARG_WITH(pdflib,for PDFlib support,
@@ -7,16 +7,16 @@
 
 if test "$PHP_PDFLIB" != "no"; then
 
-  PHP_NEW_EXTENSION(pdf, pdf.c, $ext_shared)
-  PHP_SUBST(PDF_SHARED_LIBADD)
-
   dnl #
   dnl # The main PDFlib configure
   dnl #
 
+  PHP_NEW_EXTENSION(pdf, pdf.c, $ext_shared)
+  PHP_SUBST(PDF_SHARED_LIBADD)
+
   dnl # MacOSX requires this
-  case $host_alias in
-    *darwin*)
+  case `(uname -s) 2>/dev/null || echo unknown` in
+    *arwin*)
       PHP_ADD_FRAMEWORK(Carbon)
       ;;
   esac
@@ -31,6 +31,8 @@
 PDFlib extension requires at least pdflib 4.0.x.
 See config.log for more information.
 ])
+      ],[
+          -lm $PHP_FRAMEWORKS
       ])
     ;;
     *)
@@ -47,7 +49,7 @@
 See config.log for more information.
 ])
         ],[
-          -L$PHP_PDFLIB/lib $PDF_SHARED_LIBADD -lm
+          -L$PHP_PDFLIB/lib $PDF_SHARED_LIBADD -lm $PHP_FRAMEWORKS
         ])
       else
         AC_MSG_ERROR([pdflib.h not found! Check the path passed to \
--with-pdflib=<PATH>. PATH should be the install prefix directory.]) \
                http://cvs.php.net/diff.php/pecl/pdf/package.xml?r1=1.10&r2=1.11&ty=u
Index: pecl/pdf/package.xml
diff -u pecl/pdf/package.xml:1.10 pecl/pdf/package.xml:1.11
--- pecl/pdf/package.xml:1.10	Tue Jul 20 05:14:41 2004
+++ pecl/pdf/package.xml	Thu Jul 29 10:01:17 2004
@@ -24,16 +24,17 @@
     </maintainer>
   </maintainers>
   <release>
-    <version>2.0.1</version>
-    <date>2004-07-20</date>
+    <version>2.0.2</version>
+    <date>2004-07-28</date>
     <license>PHP</license>
     <state>stable</state>
-    <notes> some Bugfixes
-- Finetunes handling of long parameters (cast to int where required).
-- The wrapper for PDF_load_image() didn't check the length of the data
-  string, and the subsequent parameters were wrong.
-- One parameter was missing for PDF_attach_file().
-    </notes>
+    <notes>Bugfixes:
+- did not work with PHP versions before PHP-4.3.x
+  (php_error_docref is used but not defined).
+  build somtimes works fine, but the problem may
+  appear during runtime.
+- pear install will work on Mac OS X now
+</notes>
     <deps>
       <dep type="php" rel="ge" version="4.1"/>
     </deps>
http://cvs.php.net/diff.php/pecl/pdf/pdf.c?r1=1.136&r2=1.137&ty=u
Index: pecl/pdf/pdf.c
diff -u pecl/pdf/pdf.c:1.136 pecl/pdf/pdf.c:1.137
--- pecl/pdf/pdf.c:1.136	Tue Jul 20 05:56:36 2004
+++ pecl/pdf/pdf.c	Thu Jul 29 10:01:17 2004
@@ -17,12 +17,12 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: pdf.c,v 1.136 2004/07/20 09:56:36 rjs Exp $ */
+/* $Id: pdf.c,v 1.137 2004/07/29 14:01:17 rjs Exp $ */
 
 /* {{{ Comments about the module */
 
 /* derived from:
-   $Id: pdf.c,v 1.136 2004/07/20 09:56:36 rjs Exp $
+   $Id: pdf.c,v 1.137 2004/07/29 14:01:17 rjs Exp $
    synced with pdflib.h 1.237 */
 
 /* PDFlib 2.02 ... 4.0.x is subject to the ALADDIN FREE PUBLIC LICENSE.
@@ -108,6 +108,8 @@
 
 #include "pdflib.h"
 
+#define   PDFLIB_PECL_VERSIONSTRING "2.0.2"
+
 #if PDFLIB_MAJORVERSION >= 5
 	/* This wrapper code will work only with PDFlib V5 or greater,
 	 * because the special handling for returning 0 instead of -1
@@ -503,7 +505,7 @@
 	NULL,
 	NULL,
 	PHP_MINFO(pdf),
-    "2.0beta1",
+	PDFLIB_PECL_VERSIONSTRING,
 	STANDARD_MODULE_PROPERTIES
 };
 /* }}} */
@@ -579,6 +581,18 @@
 
 #else  /* ! PHP_MAJOR_VERSION >= 5  */
 
+#if defined(PHP_MAJOR_VERSION) /* PHP 4.3.0 or newer */
+#define P_FROM_OBJECT(pdf, object) \
+    { \
+        pdflib_object *obj = (pdflib_object*) \
+			zend_object_store_get_object(object TSRMLS_CC); \
+        pdf = obj->p; \
+        if (!pdf) { \
+            php_error_docref(NULL TSRMLS_CC, E_WARNING, "No PDFlib object \
available"); \ +            RETURN_NULL(); \
+        } \
+    }
+#else /* !PHP 4.3.0 or newer */
 #define P_FROM_OBJECT(pdf, object) \
     { \
         pdflib_object *obj = (pdflib_object*) \
@@ -589,6 +603,7 @@
             RETURN_NULL(); \
         } \
     }
+#endif /* PHP 4.3.0 or newer */
 
 #endif /* PHP_MAJOR_VERSION >= 5  */
 
@@ -615,7 +630,11 @@
 		zend_throw_exception(pdflib_exception_class, (char *)errmsg, (long)errnum \
TSRMLS_CC);  }
 #else /* ! >= 5 */
+#if defined(PHP_MAJOR_VERSION) /* PHP 4.3.0 or newer */
 	php_error_docref(NULL TSRMLS_CC, E_ERROR, msgbuf);
+#else
+	php_error(E_ERROR, msgbuf);
+#endif
 #endif /* >= 5 */
 }
 /* }}} */
@@ -739,8 +758,8 @@
 	php_info_print_table_start();
 	php_info_print_table_row(2, "PDF Support", "enabled" );
 	php_info_print_table_row(2, "PDFlib GmbH Version", PDFLIB_VERSIONSTRING );
-	php_info_print_table_row(2, "PECL Version", "2.0.1" );
-	php_info_print_table_row(2, "Revision", "$Revision: 1.136 $" );
+	php_info_print_table_row(2, "PECL Version", PDFLIB_PECL_VERSIONSTRING);
+	php_info_print_table_row(2, "Revision", "$Revision: 1.137 $" );
 	php_info_print_table_end();
 
 }
@@ -752,7 +771,11 @@
 {
 	if ((PDF_get_majorversion() != PDFLIB_MAJORVERSION) ||
 			(PDF_get_minorversion() != PDFLIB_MINORVERSION)) {
+#if defined(PHP_MAJOR_VERSION) /* PHP 4.3.0 or newer */
 		php_error_docref(NULL TSRMLS_CC, E_ERROR,"PDFlib error: Version mismatch in \
wrapper code"); +#else
+		php_error(E_ERROR,"PDFlib error: Version mismatch in wrapper code");
+#endif
 	}
 	le_pdf = zend_register_list_destructors_ex(_free_pdf_doc, NULL, "pdf object", \
module_number);  
@@ -6517,7 +6540,7 @@
 		PDF_setpolydash(pdf, xarray, len);
 	} pdf_catch;
 
-	efree(darray);
+	efree(xarray);
 	RETURN_TRUE;
 }
 /* }}} */
@@ -7067,7 +7090,11 @@
 	ZEND_GET_RESOURCE_TYPE_ID(le_gd,"gd");
 	if(!le_gd)
 	{
+#if defined(PHP_MAJOR_VERSION) /* PHP 4.3.0 or newer */
 		php_error_docref(NULL TSRMLS_CC, E_ERROR, "Unable to find handle for GD image \
stream. Please check the GD extension is loaded."); +#else
+		php_error(E_ERROR, "Unable to find handle for GD image stream. Please check the GD \
extension is loaded."); +#endif
 	}
 	ZEND_FETCH_RESOURCE(im, gdImagePtr, image, -1, "Image", le_gd);
 

-- 
PECL CVS Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic