cvs: pecl /bcompiler bcompiler.c

From: Date: Sun, 17 Dec 2006 10:52:29 +0000
Subject: cvs: pecl /bcompiler bcompiler.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-6798@lists.php.net to get a copy of this message
val Sun Dec 17 10:52:29 2006 UTC Modified files: /pecl/bcompiler bcompiler.c Log: fix bug #8866 (incorrect handling of mixed-case classes in certain cases) http://cvs.php.net/viewvc.cgi/pecl/bcompiler/bcompiler.c?r1=1.107&r2=1.108&diff_format=u Index: pecl/bcompiler/bcompiler.c diff -u pecl/bcompiler/bcompiler.c:1.107 pecl/bcompiler/bcompiler.c:1.108 --- pecl/bcompiler/bcompiler.c:1.107 Wed Oct 4 08:45:28 2006 +++ pecl/bcompiler/bcompiler.c Sun Dec 17 10:52:29 2006 @@ -20,7 +20,7 @@ | Mike Bretz <mike@metropolis-ag.de> | +----------------------------------------------------------------------+ */ -/* $Id: bcompiler.c,v 1.107 2006/10/04 08:45:28 val Exp $ */ +/* $Id: bcompiler.c,v 1.108 2006/12/17 10:52:29 val Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1427,8 +1427,15 @@ apc_create_zend_class_entry(&zc, &key, &key_len TSRMLS_CC); if (BCOMPILERG(parsing_error)) break; if (!key) { - key = ZS2S(zc->name); +#if PHP_MAJOR_VERSION >= 6 + zstr lcname = zend_u_str_case_fold(BCOMPILERG(is_unicode) ? IS_UNICODE : IS_STRING, zc->name, zc->name_length, 0, &key_len); + key = lcname.s; + key_len++; +#else + key = estrndup(zc->name, zc->name_length); + if (key) zend_str_tolower(key, zc->name_length); key_len = zc->name_length+1; +#endif } /* is it in the class table already? */

« previous php.pecl.cvs (#6798) next »