cvs: php4(php_4_0_4) /ext/sablot CREDITS php_sablot.h sablot.c
| From: | Sascha Schumann | Date: | Fri, 08 Dec 2000 12:43:26 +0000 |
| Subject: | cvs: php4(php_4_0_4) /ext/sablot CREDITS php_sablot.h sablot.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3026@lists.php.net to get a copy of this message | ||
sas Fri Dec 8 04:43:26 2000 EDT
Branch: php_4_0_4
Modified files:
/php4/ext/sablot CREDITS php_sablot.h sablot.c
Log:
MFH on Sterling's request.
Index: php4/ext/sablot/CREDITS
diff -u php4/ext/sablot/CREDITS:1.1 php4/ext/sablot/CREDITS:1.1.2.1
--- php4/ext/sablot/CREDITS:1.1 Mon Nov 20 02:31:35 2000
+++ php4/ext/sablot/CREDITS Fri Dec 8 04:43:26 2000
@@ -1,2 +1,2 @@
-Sablot
+Sablotron XSLT
Sterling Hughes
Index: php4/ext/sablot/php_sablot.h
diff -u php4/ext/sablot/php_sablot.h:1.7.2.1 php4/ext/sablot/php_sablot.h:1.7.2.2
--- php4/ext/sablot/php_sablot.h:1.7.2.1 Mon Dec 4 08:15:26 2000
+++ php4/ext/sablot/php_sablot.h Fri Dec 8 04:43:26 2000
@@ -35,6 +35,7 @@
/* Module functions */
PHP_MINIT_FUNCTION(sablot);
PHP_MINFO_FUNCTION(sablot);
+PHP_MSHUTDOWN_FUNCTION(sablot);
/* Request functions */
PHP_RSHUTDOWN_FUNCTION(sablot);
@@ -100,7 +101,6 @@
/* Sablotron Globals */
typedef struct {
zval *errorHandler;
- SablotHandle processor;
php_sablot_error *errors;
php_sablot_error errors_start;
char *output_transform_file; /* For output transformations */
Index: php4/ext/sablot/sablot.c
diff -u php4/ext/sablot/sablot.c:1.18.2.1 php4/ext/sablot/sablot.c:1.18.2.2
--- php4/ext/sablot/sablot.c:1.18.2.1 Mon Dec 4 08:15:39 2000
+++ php4/ext/sablot/sablot.c Fri Dec 8 04:43:26 2000
@@ -32,6 +32,7 @@
#include "php_sablot.h"
static int le_sablot;
+static SablotHandle processor;
/* Functions related to PHP's list handling */
static void _php_sablot_free_processor(zend_rsrc_list_entry *rsrc);
@@ -81,23 +82,23 @@
/* Sablotron Basic Api macro's */
#define SABLOT_BASIC_CREATE_PROCESSOR() \
- if (SABLOTG(processor) == NULL) { \
+ if (processor == NULL) { \
int ret = 0; \
\
- ret = SablotCreateProcessor(&SABLOTG(processor)); \
+ ret = SablotCreateProcessor(&processor); \
if (ret) { \
SABLOTG(last_errno) = ret; \
return; \
} \
\
- ret = SablotRegHandler(SABLOTG(processor), HLR_MESSAGE, (void *)&mh, (void *)NULL); \
+ ret = SablotRegHandler(processor, HLR_MESSAGE, (void *)&mh, (void *)NULL); \
if (ret) { \
SABLOTG(last_errno) = ret; \
return; \
} \
}
-#define SABLOT_BASIC_HANDLE SABLOTG(processor)
+#define SABLOT_BASIC_HANDLE processor
/**
* SAX Handler structure, this defines the different functions to be
@@ -160,7 +161,7 @@
"sablot",
sablot_functions,
PHP_MINIT(sablot),
- NULL,
+ PHP_MSHUTDOWN(sablot),
NULL,
PHP_RSHUTDOWN(sablot),
PHP_MINFO(sablot),
@@ -176,18 +177,17 @@
PHP_MINIT_FUNCTION(sablot)
{
le_sablot = zend_register_list_destructors_ex(_php_sablot_free_processor, NULL, "Sablotron
XSLT", module_number);
+ processor = NULL;
return SUCCESS;
}
PHP_RSHUTDOWN_FUNCTION(sablot)
{
- SABLOTLS_FETCH();
-
- if (SABLOTG(processor)) {
- SablotUnregHandler(SABLOTG(processor), HLR_MESSAGE, NULL, NULL);
- SablotDestroyProcessor(SABLOTG(processor));
- }
+ if (processor) {
+ SablotUnregHandler(processor, HLR_MESSAGE, NULL, NULL);
+ SablotDestroyProcessor(processor);
+ }
return SUCCESS;
}