diff options
| author | Sterling Hughes <sterling@php.net> | 2000-09-03 19:58:12 +0000 |
|---|---|---|
| committer | Sterling Hughes <sterling@php.net> | 2000-09-03 19:58:12 +0000 |
| commit | 6a5ee2a5389be8c4062564854224ead025a903fc (patch) | |
| tree | 8c422739cb0451881686683d47797afcb8be0e97 /ext/sablot/sablot.c | |
| parent | e47d4fe249f06068c26a0464b3e718f499502eaa (diff) | |
| download | php-git-6a5ee2a5389be8c4062564854224ead025a903fc.tar.gz | |
If the user wants to use more than one handle reuse the old handle.
Diffstat (limited to 'ext/sablot/sablot.c')
| -rw-r--r-- | ext/sablot/sablot.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/sablot/sablot.c b/ext/sablot/sablot.c index 0bde0bf6db..09848a13f9 100644 --- a/ext/sablot/sablot.c +++ b/ext/sablot/sablot.c @@ -370,6 +370,12 @@ PHP_FUNCTION(xslt_create) int ret; SABLOTLS_FETCH(); + if (SABLOTG(current_processor)) { + Z_TYPE_P(return_value) = IS_RESOURCE; + Z_LVAL_P(return_value) = SABLOTG(current_processor); + return; + } + ret = SablotCreateProcessor(&p); if (ret) { @@ -403,6 +409,7 @@ PHP_FUNCTION(xslt_create) ZEND_REGISTER_RESOURCE(return_value, handle, SABLOTG(le_sablot)); handle->index = Z_LVAL_P(return_value); + SABLOTG(current_processor) = Z_LVAL_P(return_value); } /* }}} */ @@ -1079,6 +1086,8 @@ static void _php_sablot_free_processor(php_sablot *handle) SablotUnregHandler(handle->p, HLR_SAX, NULL, NULL); SablotDestroyProcessor(handle->p); } + SABLOTG(current_processor) = 0; + FUNCH_FREE(handle->startDocHandler); FUNCH_FREE(handle->startElementHandler); FUNCH_FREE(handle->endElementHandler); |
