summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/session/session.c6
-rw-r--r--ext/standard/url_scanner_ex.c78
-rw-r--r--ext/standard/url_scanner_ex.h6
-rw-r--r--ext/standard/url_scanner_ex.re20
-rw-r--r--sapi/apache/php_apache.c1
5 files changed, 49 insertions, 62 deletions
diff --git a/ext/session/session.c b/ext/session/session.c
index 7e753261b6..638b188c25 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -1271,13 +1271,13 @@ PHP_FUNCTION(session_destroy)
void session_adapt_uris(const char *src, size_t srclen, char **new, size_t *newlen TSRMLS_DC)
{
if (PS(define_sid) && (PS(session_status) == php_session_active))
- *new = url_adapt_ext_ex(src, srclen, PS(session_name), PS(id), newlen);
+ *new = url_adapt_ext_ex(src, srclen, PS(session_name), PS(id), newlen TSRMLS_CC);
}
void session_adapt_url(const char *url, size_t urllen, char **new, size_t *newlen TSRMLS_DC)
{
if (PS(define_sid) && (PS(session_status) == php_session_active))
- *new = url_adapt_single_url(url, urllen, PS(session_name), PS(id), newlen);
+ *new = url_adapt_single_url(url, urllen, PS(session_name), PS(id), newlen TSRMLS_CC);
}
void session_adapt_flush(int (*write)(const char *, uint TSRMLS_DC) TSRMLS_DC)
@@ -1285,7 +1285,7 @@ void session_adapt_flush(int (*write)(const char *, uint TSRMLS_DC) TSRMLS_DC)
char *str;
size_t len;
- str = url_adapt_flush(&len);
+ str = url_adapt_flush(&len TSRMLS_CC);
if (str) write(str, len TSRMLS_CC);
}
diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c
index 7746da4c73..35dff9f381 100644
--- a/ext/standard/url_scanner_ex.c
+++ b/ext/standard/url_scanner_ex.c
@@ -1,5 +1,5 @@
-/* Generated by re2c 0.5 on Wed Jul 4 17:05:51 2001 */
-#line 1 "/home/sas/src/php4/ext/standard/url_scanner_ex.re"
+/* Generated by re2c 0.5 on Sun Aug 5 18:41:23 2001 */
+#line 1 "url_scanner_ex.re"
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
@@ -88,7 +88,7 @@ PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("url_rewriter.tags", "a=href,area=href,frame=src,form=fakeentry", PHP_INI_ALL, OnUpdateTags, url_adapt_state_ex, php_basic_globals, basic_globals)
PHP_INI_END()
-#line 94
+#line 93
#define YYFILL(n) goto done
@@ -153,25 +153,25 @@ yy0:
if(yych >= ';') goto yy4;
yy2: yych = *++YYCURSOR;
yy3:
-#line 112
+#line 111
{ smart_str_append(dest, url); return; }
yy4: yych = *++YYCURSOR;
yy5:
-#line 113
+#line 112
{ sep = separator; goto done; }
yy6: yych = *++YYCURSOR;
yy7:
-#line 114
+#line 113
{ bash = p; goto done; }
yy8: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy9: if(yybm[0+yych] & 128) goto yy8;
yy10:
-#line 115
+#line 114
{ goto scan; }
}
-#line 116
+#line 115
done:
@@ -291,13 +291,12 @@ static inline void handle_val(STD_PARA, char quotes, char type)
#define scdebug(x)
#endif
-static inline void mainloop(url_adapt_state_ex_t *ctx, const char *newdata, size_t newlen)
+static inline void mainloop(url_adapt_state_ex_t *ctx, const char *newdata, size_t newlen TSRMLS_DC)
{
char *end, *q;
char *xp;
char *start;
int rest;
- TSRMLS_FETCH();
smart_str_appendl(&ctx->buf, newdata, newlen);
@@ -364,17 +363,17 @@ yy11:
if(yybm[0+yych] & 128) goto yy15;
yy13: yych = *++YYCURSOR;
yy14:
-#line 264
+#line 262
{ passthru(STD_ARGS); STATE = STATE_TAG; goto state_tag; }
yy15: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy16: if(yybm[0+yych] & 128) goto yy15;
yy17:
-#line 265
+#line 263
{ passthru(STD_ARGS); goto state_plain; }
}
-#line 266
+#line 264
state_tag:
@@ -428,11 +427,11 @@ yy18:
yy20: yych = *++YYCURSOR;
goto yy25;
yy21:
-#line 271
+#line 269
{ handle_tag(STD_ARGS); /* Sets STATE */; passthru(STD_ARGS); if (STATE == STATE_PLAIN) goto state_plain; else goto state_next_arg; }
yy22: yych = *++YYCURSOR;
yy23:
-#line 272
+#line 270
{ passthru(STD_ARGS); goto state_plain_begin; }
yy24: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -440,7 +439,7 @@ yy24: ++YYCURSOR;
yy25: if(yybm[0+yych] & 128) goto yy24;
goto yy21;
}
-#line 273
+#line 271
state_next_arg_begin:
@@ -511,20 +510,20 @@ yy26:
}
yy28: yych = *++YYCURSOR;
yy29:
-#line 281
+#line 279
{ passthru(STD_ARGS); handle_form(STD_ARGS); goto state_plain_begin; }
yy30: yych = *++YYCURSOR;
goto yy37;
yy31:
-#line 282
+#line 280
{ passthru(STD_ARGS); goto state_next_arg; }
yy32: yych = *++YYCURSOR;
yy33:
-#line 283
+#line 281
{ --YYCURSOR; STATE = STATE_ARG; goto state_arg; }
yy34: yych = *++YYCURSOR;
yy35:
-#line 284
+#line 282
{ passthru(STD_ARGS); goto state_plain_begin; }
yy36: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -532,7 +531,7 @@ yy36: ++YYCURSOR;
yy37: if(yybm[0+yych] & 128) goto yy36;
goto yy31;
}
-#line 285
+#line 283
state_arg:
@@ -586,11 +585,11 @@ yy38:
yy40: yych = *++YYCURSOR;
goto yy45;
yy41:
-#line 290
+#line 288
{ passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto state_before_val; }
yy42: yych = *++YYCURSOR;
yy43:
-#line 291
+#line 289
{ passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto state_next_arg; }
yy44: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -598,7 +597,7 @@ yy44: ++YYCURSOR;
yy45: if(yybm[0+yych] & 128) goto yy44;
goto yy41;
}
-#line 292
+#line 290
state_before_val:
@@ -653,12 +652,12 @@ yy48: yyaccept = 0;
if(yych == ' ') goto yy55;
if(yych == '=') goto yy53;
yy49:
-#line 298
+#line 296
{ --YYCURSOR; goto state_next_arg_begin; }
yy50: yych = *++YYCURSOR;
goto yy54;
yy51:
-#line 297
+#line 295
{ passthru(STD_ARGS); STATE = STATE_VAL; goto state_val; }
yy52: yych = *++YYCURSOR;
goto yy49;
@@ -677,7 +676,7 @@ yy57: YYCURSOR = YYMARKER;
case 0: goto yy49;
}
}
-#line 299
+#line 297
@@ -747,7 +746,7 @@ yy60: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if(yych != '>') goto yy74;
yy61:
-#line 308
+#line 306
{ passthru(STD_ARGS); goto state_next_arg_begin; }
yy62: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -756,7 +755,7 @@ yy62: yyaccept = 0;
yy63: yych = *++YYCURSOR;
goto yy67;
yy64:
-#line 307
+#line 305
{ handle_val(STD_ARGS, 0, '"'); goto state_next_arg_begin; }
yy65: yych = *++YYCURSOR;
goto yy61;
@@ -776,7 +775,7 @@ yy70: YYCURSOR = YYMARKER;
}
yy71: yych = *++YYCURSOR;
yy72:
-#line 306
+#line 304
{ handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; }
yy73: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -785,10 +784,10 @@ yy74: if(yybm[0+yych] & 128) goto yy73;
if(yych >= '>') goto yy70;
yy75: yych = *++YYCURSOR;
yy76:
-#line 305
+#line 303
{ handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; }
}
-#line 309
+#line 307
stop:
@@ -801,11 +800,10 @@ stop:
ctx->buf.len = rest;
}
-char *url_adapt_flush(size_t *newlen)
+char *url_adapt_flush(size_t *newlen TSRMLS_DC)
{
char *ret = NULL;
url_adapt_state_ex_t *ctx;
- TSRMLS_FETCH();
ctx = &BG(url_adapt_state_ex);
@@ -819,13 +817,12 @@ char *url_adapt_flush(size_t *newlen)
return ret;
}
-char *url_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen)
+char *url_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen TSRMLS_DC)
{
smart_str surl = {0};
smart_str buf = {0};
smart_str sname = {0};
smart_str sval = {0};
- TSRMLS_FETCH();
smart_str_setl(&surl, url, urllen);
smart_str_sets(&sname, name);
@@ -839,17 +836,16 @@ char *url_adapt_single_url(const char *url, size_t urllen, const char *name, con
return buf.c;
}
-char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char *value, size_t *newlen)
+char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char *value, size_t *newlen TSRMLS_DC)
{
char *ret;
url_adapt_state_ex_t *ctx;
- TSRMLS_FETCH();
ctx = &BG(url_adapt_state_ex);
smart_str_sets(&ctx->q_name, name);
smart_str_sets(&ctx->q_value, value);
- mainloop(ctx, src, srclen);
+ mainloop(ctx, src, srclen TSRMLS_CC);
*newlen = ctx->result.len;
if (!ctx->result.c)
@@ -889,7 +885,9 @@ PHP_MINIT_FUNCTION(url_scanner)
url_adapt_state_ex_t *ctx;
ctx = &BG(url_adapt_state_ex);
- ctx->tags = NULL;
+
+ ctx->tags = NULL;
+
REGISTER_INI_ENTRIES();
return SUCCESS;
}
diff --git a/ext/standard/url_scanner_ex.h b/ext/standard/url_scanner_ex.h
index a76bd66f45..d5595570ae 100644
--- a/ext/standard/url_scanner_ex.h
+++ b/ext/standard/url_scanner_ex.h
@@ -24,11 +24,11 @@ PHP_MSHUTDOWN_FUNCTION(url_scanner_ex);
PHP_RSHUTDOWN_FUNCTION(url_scanner_ex);
PHP_RINIT_FUNCTION(url_scanner_ex);
-char *url_adapt_ext_ex(const char *src, size_t srclen, const char *name, const char *value, size_t *newlen);
+char *url_adapt_ext_ex(const char *src, size_t srclen, const char *name, const char *value, size_t *newlen TSRMLS_DC);
-char *url_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen);
+char *url_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen TSRMLS_DC);
-char *url_adapt_flush(size_t *);
+char *url_adapt_flush(size_t * TSRMLS_DC);
#include "php_smart_str_public.h"
diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re
index 009c6859fd..2bcc2a286b 100644
--- a/ext/standard/url_scanner_ex.re
+++ b/ext/standard/url_scanner_ex.re
@@ -45,7 +45,6 @@ static PHP_INI_MH(OnUpdateTags)
char *key;
char *lasts;
char *tmp;
- TSRMLS_FETCH();
ctx = &BG(url_adapt_state_ex);
@@ -232,13 +231,12 @@ static inline void handle_val(STD_PARA, char quotes, char type)
#define scdebug(x)
#endif
-static inline void mainloop(url_adapt_state_ex_t *ctx, const char *newdata, size_t newlen)
+static inline void mainloop(url_adapt_state_ex_t *ctx, const char *newdata, size_t newlen TSRMLS_DC)
{
char *end, *q;
char *xp;
char *start;
int rest;
- TSRMLS_FETCH();
smart_str_appendl(&ctx->buf, newdata, newlen);
@@ -318,11 +316,10 @@ stop:
ctx->buf.len = rest;
}
-char *url_adapt_flush(size_t *newlen)
+char *url_adapt_flush(size_t *newlen TSRMLS_DC)
{
char *ret = NULL;
url_adapt_state_ex_t *ctx;
- TSRMLS_FETCH();
ctx = &BG(url_adapt_state_ex);
@@ -336,13 +333,12 @@ char *url_adapt_flush(size_t *newlen)
return ret;
}
-char *url_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen)
+char *url_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen TSRMLS_DC)
{
smart_str surl = {0};
smart_str buf = {0};
smart_str sname = {0};
smart_str sval = {0};
- TSRMLS_FETCH();
smart_str_setl(&surl, url, urllen);
smart_str_sets(&sname, name);
@@ -356,17 +352,16 @@ char *url_adapt_single_url(const char *url, size_t urllen, const char *name, con
return buf.c;
}
-char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char *value, size_t *newlen)
+char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char *value, size_t *newlen TSRMLS_DC)
{
char *ret;
url_adapt_state_ex_t *ctx;
- TSRMLS_FETCH();
ctx = &BG(url_adapt_state_ex);
smart_str_sets(&ctx->q_name, name);
smart_str_sets(&ctx->q_value, value);
- mainloop(ctx, src, srclen);
+ mainloop(ctx, src, srclen TSRMLS_CC);
*newlen = ctx->result.len;
if (!ctx->result.c)
@@ -379,7 +374,6 @@ char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char
PHP_RINIT_FUNCTION(url_scanner)
{
url_adapt_state_ex_t *ctx;
- TSRMLS_FETCH();
ctx = &BG(url_adapt_state_ex);
@@ -391,7 +385,6 @@ PHP_RINIT_FUNCTION(url_scanner)
PHP_RSHUTDOWN_FUNCTION(url_scanner)
{
url_adapt_state_ex_t *ctx;
- TSRMLS_FETCH();
ctx = &BG(url_adapt_state_ex);
@@ -406,7 +399,6 @@ PHP_RSHUTDOWN_FUNCTION(url_scanner)
PHP_MINIT_FUNCTION(url_scanner)
{
url_adapt_state_ex_t *ctx;
- TSRMLS_FETCH();
ctx = &BG(url_adapt_state_ex);
@@ -418,8 +410,6 @@ PHP_MINIT_FUNCTION(url_scanner)
PHP_MSHUTDOWN_FUNCTION(url_scanner)
{
- TSRMLS_FETCH();
-
UNREGISTER_INI_ENTRIES();
zend_hash_destroy(BG(url_adapt_state_ex).tags);
free(BG(url_adapt_state_ex).tags);
diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c
index 53fde3343f..7140501cf6 100644
--- a/sapi/apache/php_apache.c
+++ b/sapi/apache/php_apache.c
@@ -182,7 +182,6 @@ PHP_MINFO_FUNCTION(apache)
extern char *user_name;
extern gid_t group_id;
extern int max_requests_per_child;
- TSRMLS_FETCH();
serv = ((request_rec *) SG(server_context))->server;