summaryrefslogtreecommitdiff
path: root/Zend/zend_string.c
diff options
context:
space:
mode:
authorGopal Vijayaraghavan <gopalv@php.net>2011-07-28 03:03:06 +0000
committerGopal Vijayaraghavan <gopalv@php.net>2011-07-28 03:03:06 +0000
commit8089b31002f73bdf488da444a0c634d36928852f (patch)
tree25239c0cc974f70b1e332bc87c506a7c96677eee /Zend/zend_string.c
parent7b9071f71d14ae17813a931b80463ff4b26975c3 (diff)
downloadphp-git-8089b31002f73bdf488da444a0c634d36928852f.tar.gz
merge to trunk - Allow zend_is_interned_string to be pluggable
Diffstat (limited to 'Zend/zend_string.c')
-rw-r--r--Zend/zend_string.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/zend_string.c b/Zend/zend_string.c
index 949c191582..77b165ab20 100644
--- a/Zend/zend_string.c
+++ b/Zend/zend_string.c
@@ -30,10 +30,12 @@
#endif
ZEND_API const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC);
+ZEND_API zend_bool (*zend_is_interned_string)(const char *str TSRMLS_DC);
ZEND_API void (*zend_interned_strings_snapshot)(TSRMLS_D);
ZEND_API void (*zend_interned_strings_restore)(TSRMLS_D);
static const char *zend_new_interned_string_int(const char *str, int len, int free_src TSRMLS_DC);
+static zend_bool zend_is_interned_string_int(const char *str TSRMLS_DC);
static void zend_interned_strings_snapshot_int(TSRMLS_D);
static void zend_interned_strings_restore_int(TSRMLS_D);
@@ -64,6 +66,7 @@ void zend_interned_strings_init(TSRMLS_D)
#endif
zend_new_interned_string = zend_new_interned_string_int;
+ zend_is_interned_string = zend_is_interned_string_int;
zend_interned_strings_snapshot = zend_interned_strings_snapshot_int;
zend_interned_strings_restore = zend_interned_strings_restore_int;
}
@@ -177,6 +180,11 @@ static const char *zend_new_interned_string_int(const char *arKey, int nKeyLengt
#endif
}
+static zend_bool zend_is_interned_string_int(const char *s TSRMLS_DC)
+{
+ return (((s) >= CG(interned_strings_start)) && ((s) < CG(interned_strings_end)));
+}
+
static void zend_interned_strings_snapshot_int(TSRMLS_D)
{
CG(interned_strings_snapshot_top) = CG(interned_strings_top);