mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
Fix sablotron.
Add a little beautifying of the extensions name for phpcredits() (Sablotron XSLT not Sablot). #would somebody please add this to the release tree, thanks much!
This commit is contained in:
parent
767fa2c6af
commit
9b3942a79a
3 changed files with 15 additions and 18 deletions
|
@ -1,2 +1,2 @@
|
||||||
Sablot
|
Sablotron XSLT
|
||||||
Sterling Hughes
|
Sterling Hughes
|
||||||
|
|
|
@ -35,9 +35,7 @@ extern zend_module_entry sablot_module_entry;
|
||||||
/* Module functions */
|
/* Module functions */
|
||||||
PHP_MINIT_FUNCTION(sablot);
|
PHP_MINIT_FUNCTION(sablot);
|
||||||
PHP_MINFO_FUNCTION(sablot);
|
PHP_MINFO_FUNCTION(sablot);
|
||||||
|
PHP_MSHUTDOWN_FUNCTION(sablot);
|
||||||
/* Request functions */
|
|
||||||
PHP_RSHUTDOWN_FUNCTION(sablot);
|
|
||||||
|
|
||||||
/* Output transformation functions */
|
/* Output transformation functions */
|
||||||
PHP_FUNCTION(xslt_output_begintransform);
|
PHP_FUNCTION(xslt_output_begintransform);
|
||||||
|
@ -100,7 +98,6 @@ typedef struct {
|
||||||
/* Sablotron Globals */
|
/* Sablotron Globals */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
zval *errorHandler;
|
zval *errorHandler;
|
||||||
SablotHandle processor;
|
|
||||||
php_sablot_error *errors;
|
php_sablot_error *errors;
|
||||||
php_sablot_error errors_start;
|
php_sablot_error errors_start;
|
||||||
char *output_transform_file; /* For output transformations */
|
char *output_transform_file; /* For output transformations */
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "php_sablot.h"
|
#include "php_sablot.h"
|
||||||
|
|
||||||
static int le_sablot;
|
static int le_sablot;
|
||||||
|
static SablotHandle processor;
|
||||||
|
|
||||||
/* Functions related to PHP's list handling */
|
/* Functions related to PHP's list handling */
|
||||||
static void _php_sablot_free_processor(zend_rsrc_list_entry *rsrc);
|
static void _php_sablot_free_processor(zend_rsrc_list_entry *rsrc);
|
||||||
|
@ -81,23 +82,23 @@ static zval *_php_sablot_resource_zval(long);
|
||||||
|
|
||||||
/* Sablotron Basic Api macro's */
|
/* Sablotron Basic Api macro's */
|
||||||
#define SABLOT_BASIC_CREATE_PROCESSOR() \
|
#define SABLOT_BASIC_CREATE_PROCESSOR() \
|
||||||
if (SABLOTG(processor) == NULL) { \
|
if (processor == NULL) { \
|
||||||
int ret = 0; \
|
int ret = 0; \
|
||||||
\
|
\
|
||||||
ret = SablotCreateProcessor(&SABLOTG(processor)); \
|
ret = SablotCreateProcessor(&processor); \
|
||||||
if (ret) { \
|
if (ret) { \
|
||||||
SABLOTG(last_errno) = ret; \
|
SABLOTG(last_errno) = ret; \
|
||||||
return; \
|
return; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
ret = SablotRegHandler(SABLOTG(processor), HLR_MESSAGE, (void *)&mh, (void *)NULL); \
|
ret = SablotRegHandler(processor, HLR_MESSAGE, (void *)&mh, (void *)NULL); \
|
||||||
if (ret) { \
|
if (ret) { \
|
||||||
SABLOTG(last_errno) = ret; \
|
SABLOTG(last_errno) = ret; \
|
||||||
return; \
|
return; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SABLOT_BASIC_HANDLE SABLOTG(processor)
|
#define SABLOT_BASIC_HANDLE processor
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SAX Handler structure, this defines the different functions to be
|
* SAX Handler structure, this defines the different functions to be
|
||||||
|
@ -160,9 +161,9 @@ zend_module_entry sablot_module_entry = {
|
||||||
"sablot",
|
"sablot",
|
||||||
sablot_functions,
|
sablot_functions,
|
||||||
PHP_MINIT(sablot),
|
PHP_MINIT(sablot),
|
||||||
NULL,
|
PHP_MSHUTDOWN(sablot),
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
PHP_RSHUTDOWN(sablot),
|
|
||||||
PHP_MINFO(sablot),
|
PHP_MINFO(sablot),
|
||||||
STANDARD_MODULE_PROPERTIES
|
STANDARD_MODULE_PROPERTIES
|
||||||
};
|
};
|
||||||
|
@ -176,18 +177,17 @@ ZEND_GET_MODULE(sablot)
|
||||||
PHP_MINIT_FUNCTION(sablot)
|
PHP_MINIT_FUNCTION(sablot)
|
||||||
{
|
{
|
||||||
le_sablot = zend_register_list_destructors_ex(_php_sablot_free_processor, NULL, "Sablotron XSLT", module_number);
|
le_sablot = zend_register_list_destructors_ex(_php_sablot_free_processor, NULL, "Sablotron XSLT", module_number);
|
||||||
|
processor = NULL;
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
PHP_RSHUTDOWN_FUNCTION(sablot)
|
PHP_MSHUTDOWN_FUNCTION(sablot)
|
||||||
{
|
{
|
||||||
SABLOTLS_FETCH();
|
if (processor) {
|
||||||
|
SablotUnregHandler(processor, HLR_MESSAGE, NULL, NULL);
|
||||||
if (SABLOTG(processor)) {
|
SablotDestroyProcessor(processor);
|
||||||
SablotUnregHandler(SABLOTG(processor), HLR_MESSAGE, NULL, NULL);
|
}
|
||||||
SablotDestroyProcessor(SABLOTG(processor));
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue