svn: /php/php-src/ branches/PHP_5_4/Zend/zend_string.c branches/PHP_5_4/Zend/zend_string.h trunk/Zend/zend_string.c trunk/Zend/zend_string.h

From: Date: Thu, 28 Jul 2011 12:01:42 +0000
Subject: svn: /php/php-src/ branches/PHP_5_4/Zend/zend_string.c branches/PHP_5_4/Zend/zend_string.h trunk/Zend/zend_string.c trunk/Zend/zend_string.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-65648@lists.php.net to get a copy of this message
dmitry Thu, 28 Jul 2011 12:01:42 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=313844 Log: Reverted Gopal's patch that allowed plugable interned string check 1. It introduced a significant slowdown 2. It didn't fix the real problem in APC (I'm goint to commit the fix) Changed paths: U php/php-src/branches/PHP_5_4/Zend/zend_string.c U php/php-src/branches/PHP_5_4/Zend/zend_string.h U php/php-src/trunk/Zend/zend_string.c U php/php-src/trunk/Zend/zend_string.h Modified: php/php-src/branches/PHP_5_4/Zend/zend_string.c =================================================================== --- php/php-src/branches/PHP_5_4/Zend/zend_string.c 2011-07-28 11:54:53 UTC (rev 313843) +++ php/php-src/branches/PHP_5_4/Zend/zend_string.c 2011-07-28 12:01:42 UTC (rev 313844) @@ -30,12 +30,10 @@ #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); @@ -66,7 +64,6 @@ #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; } @@ -180,11 +177,6 @@ #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); Modified: php/php-src/branches/PHP_5_4/Zend/zend_string.h =================================================================== --- php/php-src/branches/PHP_5_4/Zend/zend_string.h 2011-07-28 11:54:53 UTC (rev 313843) +++ php/php-src/branches/PHP_5_4/Zend/zend_string.h 2011-07-28 12:01:42 UTC (rev 313844) @@ -24,7 +24,6 @@ #include "zend.h" ZEND_API extern const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC); -ZEND_API extern zend_bool (*zend_is_interned_string)(const char *str TSRMLS_DC); ZEND_API extern void (*zend_interned_strings_snapshot)(TSRMLS_D); ZEND_API extern void (*zend_interned_strings_restore)(TSRMLS_D); @@ -34,7 +33,7 @@ #ifndef ZTS #define IS_INTERNED(s) \ - (zend_is_interned_string ? zend_is_interned_string((s) TSRMLS_CC) : 0) + (((s) >= CG(interned_strings_start)) && ((s) < CG(interned_strings_end))) #else Modified: php/php-src/trunk/Zend/zend_string.c =================================================================== --- php/php-src/trunk/Zend/zend_string.c 2011-07-28 11:54:53 UTC (rev 313843) +++ php/php-src/trunk/Zend/zend_string.c 2011-07-28 12:01:42 UTC (rev 313844) @@ -30,12 +30,10 @@ #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); @@ -66,7 +64,6 @@ #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; } @@ -180,11 +177,6 @@ #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); Modified: php/php-src/trunk/Zend/zend_string.h =================================================================== --- php/php-src/trunk/Zend/zend_string.h 2011-07-28 11:54:53 UTC (rev 313843) +++ php/php-src/trunk/Zend/zend_string.h 2011-07-28 12:01:42 UTC (rev 313844) @@ -24,7 +24,6 @@ #include "zend.h" ZEND_API extern const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC); -ZEND_API extern zend_bool (*zend_is_interned_string)(const char *str TSRMLS_DC); ZEND_API extern void (*zend_interned_strings_snapshot)(TSRMLS_D); ZEND_API extern void (*zend_interned_strings_restore)(TSRMLS_D); @@ -34,7 +33,7 @@ #ifndef ZTS #define IS_INTERNED(s) \ - (zend_is_interned_string ? zend_is_interned_string((s) TSRMLS_CC) : 0) + (((s) >= CG(interned_strings_start)) && ((s) < CG(interned_strings_end))) #else

« previous php.cvs (#65648) next »