diff options
author | Sascha Schumann <sas@php.net> | 2000-09-19 17:32:27 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-09-19 17:32:27 +0000 |
commit | 4b3fb7b05ecdb583f26bec1fb2f994e57dc5f5a3 (patch) | |
tree | 9af0dc8927c44f6ff5a98d022c70a207fd490a01 /ext/standard/url_scanner_ex.h | |
parent | d9d65f18e9eec078f76cbf3bc95833cde055c8a3 (diff) | |
download | php-git-4b3fb7b05ecdb583f26bec1fb2f994e57dc5f5a3.tar.gz |
Add new URL scanner. This version is up to 20% faster. It will be
enabled by default once I'm sure that it works in every case.
To enable it, apply s/url_adapt_ext/url_adapt_ext_ex/ to session.c
Diffstat (limited to 'ext/standard/url_scanner_ex.h')
-rw-r--r-- | ext/standard/url_scanner_ex.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ext/standard/url_scanner_ex.h b/ext/standard/url_scanner_ex.h new file mode 100644 index 0000000000..e3e6501b82 --- /dev/null +++ b/ext/standard/url_scanner_ex.h @@ -0,0 +1,44 @@ +/* + +----------------------------------------------------------------------+ + | PHP version 4.0 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Sascha Schumann <sascha@schumann.cx> | + +----------------------------------------------------------------------+ +*/ + +#ifndef URL_SCANNER_EX_H +#define URL_SCANNER_EX_H + +PHP_RSHUTDOWN_FUNCTION(url_scanner_ex); +PHP_RINIT_FUNCTION(url_scanner_ex); + +char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char *value, size_t *newlen); + +typedef struct { + char *c; + size_t len; + size_t a; +} smart_str; + +typedef struct { + smart_str arg; + smart_str tag; + smart_str para; + smart_str work; + smart_str result; + int state; + smart_str name; + smart_str value; +} url_adapt_state_ex_t; + +#endif |