Markus Fischer wrote:
> You don't need (and shouldn't) call TSRMLS_FETCH() here.
> Declaring tokenizer() having a TSRMLS_DC and passing
> TSRMLS_CC when calling it should be sufficient.
Stupid me, of course. The patch below fixes all compiler errors and
warnings. However, I now get a linkage error due to an unresolved
external symbol: _lex_scan.
Index: tokenizer.c
===================================================================
RCS file: /repository/php4/ext/tokenizer/tokenizer.c,v
retrieving revision 1.1
diff -u -2 -b -w -B -r1.1 tokenizer.c
--- tokenizer.c 8 Feb 2002 18:49:40 -0000 1.1
+++ tokenizer.c 9 Feb 2002 09:23:29 -0000
@@ -316,5 +316,5 @@
/* }}} */
-static void tokenize(zval *return_value)
+static void tokenize(zval *return_value TSRMLS_DC)
{
zval token;
@@ -326,5 +326,5 @@
ZVAL_NULL(&token);
- while ((token_type = lex_scan(&token CLS_CC))) {
+ while ((token_type = lex_scan(&token TSRMLS_CC))) {
destroy = 1;
switch (token_type) {
@@ -481,13 +481,13 @@
ZVAL_STRINGL(&source_z, source, source_len, 0);
- zend_save_lexical_state(&original_lex_state CLS_CC);
+ zend_save_lexical_state(&original_lex_state TSRMLS_CC);
- if (zend_prepare_string_for_scanning(&source_z, "") == FAILURE) {
+ if (zend_prepare_string_for_scanning(&source_z, "" TSRMLS_CC) ==
FAILURE
) {
RETURN_EMPTY_STRING();
}
- tokenize(return_value);
+ tokenize(return_value TSRMLS_CC);
- zend_restore_lexical_state(&original_lex_state CLS_CC);
+ zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
}
/* }}} */
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php