[PHP-CVS] cvs: php-src(PHP_5_0) /ext/xsl php_xsl.c php_xsl.h

2005-01-17 Thread Christian Stocker
chregu  Mon Jan 17 11:06:57 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/xslphp_xsl.c php_xsl.h 
  Log:
  revert these 2 files... shouldn't have been comitted ..
  
  
http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.c?r1=1.22.2.5r2=1.22.2.6ty=u
Index: php-src/ext/xsl/php_xsl.c
diff -u php-src/ext/xsl/php_xsl.c:1.22.2.5 php-src/ext/xsl/php_xsl.c:1.22.2.6
--- php-src/ext/xsl/php_xsl.c:1.22.2.5  Mon Jan 17 11:01:35 2005
+++ php-src/ext/xsl/php_xsl.c   Mon Jan 17 11:06:57 2005
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.c,v 1.22.2.5 2005/01/17 16:01:35 chregu Exp $ */
+/* $Id: php_xsl.c,v 1.22.2.6 2005/01/17 16:06:57 chregu Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -83,11 +83,6 @@
FREE_HASHTABLE(intern-node_list);
}
 
-   if (intern-doc) {
-   php_libxml_decrement_doc_ref(intern-doc TSRMLS_CC);
-   efree(intern-doc);
-   }
-
if (intern-ptr) {
/* free wrapper */
if (((xsltStylesheetPtr) intern-ptr)-_private != NULL) {
@@ -117,7 +112,6 @@
intern-hasKeys = 0;
intern-registerPhpFunctions = 0;
intern-node_list = NULL;
-   intern-doc = NULL;
 
ALLOC_HASHTABLE(intern-std.properties);
zend_hash_init(intern-std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.h?r1=1.10.2.3r2=1.10.2.4ty=u
Index: php-src/ext/xsl/php_xsl.h
diff -u php-src/ext/xsl/php_xsl.h:1.10.2.3 php-src/ext/xsl/php_xsl.h:1.10.2.4
--- php-src/ext/xsl/php_xsl.h:1.10.2.3  Mon Jan 17 11:01:35 2005
+++ php-src/ext/xsl/php_xsl.h   Mon Jan 17 11:06:57 2005
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.h,v 1.10.2.3 2005/01/17 16:01:35 chregu Exp $ */
+/* $Id: php_xsl.h,v 1.10.2.4 2005/01/17 16:06:57 chregu Exp $ */
 
 #ifndef PHP_XSL_H
 #define PHP_XSL_H
@@ -58,7 +58,6 @@
int hasKeys;
int registerPhpFunctions;
HashTable *node_list;
-   php_libxml_node_object *doc;
 } xsl_object;
 
 void php_xsl_set_object(zval *wrapper, void *obj TSRMLS_DC);

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



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/xsl php_xsl.c php_xsl.h xsltprocessor.c

2004-09-08 Thread Rob Richards
rrichards   Wed Sep  8 12:54:53 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/xslphp_xsl.c php_xsl.h xsltprocessor.c 
  Log:
  MHF: fix issue with multiple xsl objects using registerPHPfunctions
   - also fixes threading issue
  
http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.c?r1=1.22.2.3r2=1.22.2.4ty=u
Index: php-src/ext/xsl/php_xsl.c
diff -u php-src/ext/xsl/php_xsl.c:1.22.2.3 php-src/ext/xsl/php_xsl.c:1.22.2.4
--- php-src/ext/xsl/php_xsl.c:1.22.2.3  Mon Aug 30 11:00:07 2004
+++ php-src/ext/xsl/php_xsl.c   Wed Sep  8 12:54:53 2004
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.c,v 1.22.2.3 2004/08/30 15:00:07 rrichards Exp $ */
+/* $Id: php_xsl.c,v 1.22.2.4 2004/09/08 16:54:53 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -140,6 +140,13 @@
exsltRegisterAll();
 #endif
  
+   xsltRegisterExtModuleFunction ((const xmlChar *) functionString,
+  (const xmlChar *) http://php.net/xsl;,
+  xsl_ext_function_string_php);
+   xsltRegisterExtModuleFunction ((const xmlChar *) function,
+  (const xmlChar *) http://php.net/xsl;,
+  xsl_ext_function_object_php);
+
REGISTER_LONG_CONSTANT(XSL_CLONE_AUTO,  0, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(XSL_CLONE_NEVER,-1, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(XSL_CLONE_ALWAYS,1, CONST_CS | 
CONST_PERSISTENT);
@@ -226,6 +233,12 @@
/* uncomment this line if you have INI entries
UNREGISTER_INI_ENTRIES();
*/
+
+   xsltUnregisterExtModuleFunction ((const xmlChar *) functionString,
+  (const xmlChar *) http://php.net/xsl;);
+   xsltUnregisterExtModuleFunction ((const xmlChar *) function,
+  (const xmlChar *) http://php.net/xsl;);
+
xsltCleanupGlobals();
 
return SUCCESS;
http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.h?r1=1.10.2.1r2=1.10.2.2ty=u
Index: php-src/ext/xsl/php_xsl.h
diff -u php-src/ext/xsl/php_xsl.h:1.10.2.1 php-src/ext/xsl/php_xsl.h:1.10.2.2
--- php-src/ext/xsl/php_xsl.h:1.10.2.1  Wed Jul 28 08:42:16 2004
+++ php-src/ext/xsl/php_xsl.h   Wed Sep  8 12:54:53 2004
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.h,v 1.10.2.1 2004/07/28 12:42:16 chregu Exp $ */
+/* $Id: php_xsl.h,v 1.10.2.2 2004/09/08 16:54:53 rrichards Exp $ */
 
 #ifndef PHP_XSL_H
 #define PHP_XSL_H
@@ -63,6 +63,9 @@
 void php_xsl_set_object(zval *wrapper, void *obj TSRMLS_DC);
 void xsl_objects_free_storage(void *object TSRMLS_DC);
 zval *php_xsl_create_object(xsltStylesheetPtr obj, int *found, zval *wrapper_in, zval 
*return_value  TSRMLS_DC);
+
+void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs);
+void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs);
 
 #define REGISTER_XSL_CLASS(ce, name, parent_ce, funcs, entry) \
 INIT_CLASS_ENTRY(ce, name, funcs); \
http://cvs.php.net/diff.php/php-src/ext/xsl/xsltprocessor.c?r1=1.29.2.3r2=1.29.2.4ty=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.29.2.3 
php-src/ext/xsl/xsltprocessor.c:1.29.2.4
--- php-src/ext/xsl/xsltprocessor.c:1.29.2.3Tue Aug 10 04:02:00 2004
+++ php-src/ext/xsl/xsltprocessor.c Wed Sep  8 12:54:53 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: xsltprocessor.c,v 1.29.2.3 2004/08/10 08:02:00 chregu Exp $ */
+/* $Id: xsltprocessor.c,v 1.29.2.4 2004/09/08 16:54:53 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -27,9 +27,6 @@
 #include php_xsl.h
 #include ext/libxml/php_libxml.h
 
-static void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs);
-static void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs);
-
 /*
 * class xsl_xsltprocessor 
 *
@@ -76,13 +73,6 @@
return (char *) value;
 }
 
-static void php_xsl_unregister_php_functions() {
-   xsltUnregisterExtModuleFunction ((const xmlChar *) functionString,
-  (const xmlChar *) http://php.net/xsl;);
-   xsltUnregisterExtModuleFunction ((const xmlChar *) function,
-  (const xmlChar *) http://php.net/xsl;);
-}
-
 
 /* {{{ php_xsl_xslt_make_params()
Translates a PHP array to a libxslt parameters array */
@@ -139,6 +129,7 @@
zval **args;
zval *retval;
int result, i, ret;
+   int error = 0;
zend_fcall_info fci;
zval handler;
xmlXPathObjectPtr obj;
@@ -148,17 +139,43 @@

TSRMLS_FETCH();
 
+   if (! zend_is_executing(TSRMLS_C)) {
+   xsltGenericError(xsltGenericErrorContext,
+