[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Fri May 28 20:32:18 2004 EDT Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1641r2=1.1642ty=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.1641 php-src/ChangeLog:1.1642 --- php-src/ChangeLog:1.1641Thu May 27 20:31:40 2004 +++ php-src/ChangeLog Fri May 28 20:32:18 2004 @@ -1,3 +1,89 @@ +2004-05-28 Ard Biesheuvel [EMAIL PROTECTED] + +* ext/interbase/interbase.c + ext/interbase/php_ibase_includes.h: + Changed default date format to ISO + Enable sync flag in connect() + +* ext/interbase/interbase.c: + Fix commit/rollback of multi-link transactions + Some CS + +2004-05-28 Andrei Zmievski [EMAIL PROTECTED] + +* ZendEngine2/zend.c: + Allow user-defined error handlers to indicate whether default error + handler should be re-invoked, by returning true or false. + +2004-05-28 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/xsl/xsltprocessor.c: + Fixed memory leak on error. + +* main/main.c: + The engine will take care out-of-memory situation for us. + +* (PHP_4_3) + ext/gd/libgd/gd_topal.c: + MFH: Fixed bug #28311 (Transparency detection code is off by 1). + +2004-05-28 Stefan Esser [EMAIL PROTECTED] + +* ext/standard/http_fopen_wrapper.c: + Fixed off-by-one in http_fopen_wrapper + +2004-05-28 Wez Furlong [EMAIL PROTECTED] + +* ext/standard/proc_open.c: + Hopefully resolve proc_open build issues. + + If we need anything more elaborate than this, then we can move to a + configure + time check as Sascha suggests. + +2004-05-28 Christian Stocker [EMAIL PROTECTED] + +* ext/xsl/xsltprocessor.c: + fix memleak in php callbacks + +2004-05-28 Stefan Esser [EMAIL PROTECTED] + +* ext/standard/url.c: + Fixed off-by-one in php_parse_url. + +2004-05-28 Derick Rethans [EMAIL PROTECTED] + +* TODO-5.1: + - Added date/time parser thingy. + +* NEWS + ext/standard/basic_functions.c: + - Fixed ip2long() behavior if an invalid IP address was passed to the +function. This makes it possible to distingiush between + 255.255.255.255 +and a wrong one. + +2004-05-28 Marcus Boerger [EMAIL PROTECTED] + +* TODO-5.1: + Add more outstanding patches + +* TODO + TODO-PHP5: + Remove finished tasks + +* TODO-5.1: + Add more things + +* ZendEngine2/zend_execute.c: + Prevent possible problems with illegal properties + +2004-05-28 Derick Rethans [EMAIL PROTECTED] + +* ZendEngine2/zend_builtin_functions.c: + - Make the default mask for user defined error handlers include ALL errors, +including E_STRICT. + 2004-05-27 Ilia Alshanetsky [EMAIL PROTECTED] * ext/session/tests/skipif.inc: @@ -4103,7 +4189,7 @@ 2004-03-18 Pierre-Alain Joye [EMAIL PROTECTED] * ext/gd/tests/bug27582_2.phpt: - - Fix the test description and $Id: ChangeLog,v 1.1641 2004/05/28 00:31:40 changelog Exp $ + - Fix the test description and $Id: ChangeLog,v 1.1642 2004/05/29 00:32:18 changelog Exp $ 2004-03-18 Derick Rethans [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src / TODO-5.1
helly Fri May 28 05:03:00 2004 EDT Modified files: /php-srcTODO-5.1 Log: Add more things http://cvs.php.net/diff.php/php-src/TODO-5.1?r1=1.1r2=1.2ty=u Index: php-src/TODO-5.1 diff -u php-src/TODO-5.1:1.1 php-src/TODO-5.1:1.2 --- php-src/TODO-5.1:1.1Thu May 27 12:22:47 2004 +++ php-src/TODO-5.1Fri May 28 05:03:00 2004 @@ -2,3 +2,11 @@ --- - Look at making zend_constant value member be a zval* instead of zval. (Andi) - Add the patch for referring to existing .ini vars in .ini files. (Andrei) + - Implement inheritance rules for type hints. (Marcus) + - Implement true/false/NULL as keywords (apply the patch). (Andi, Marcus) + - Find a keyword for the if-set-or operator (apply the patch). (Marcus, all) + +Build System + + - Implement load order of built-in extensions (apply the patch). (Wez) + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / TODO-PHP5
helly Fri May 28 05:06:56 2004 EDT Modified files: /php-srcTODO-PHP5 Log: Remove finished tasks http://cvs.php.net/diff.php/php-src/TODO-PHP5?r1=1.2r2=1.3ty=u Index: php-src/TODO-PHP5 diff -u php-src/TODO-PHP5:1.2 php-src/TODO-PHP5:1.3 --- php-src/TODO-PHP5:1.2 Thu Feb 27 13:45:37 2003 +++ php-src/TODO-PHP5 Fri May 28 05:06:56 2004 @@ -16,83 +16,6 @@ Time frame: ? -Component: Introspection - -get_function_definition(is_callable [field]) = -array( - file = filename - line_start = - line_end = - parameters = array( name, byref, default ) - static_variables = array( name, value/default ) - scope = 'namespace' | 'class' | null - namespace = classname | namespacename | 'main' - protection = protection_flags - phpdoc = pre-scanned-phpdoc-string - type = 'internal' | 'user' -) - -get_class_definition(class [field]) = -array( - type = 'internal' | 'user' - file = filename - line_start = - line_end = - name = pretty-name - parent = classname | namespace | null - flags = bitfield (ABSTRACT) - methods = array( array( name, phpdoc ) ) - default_properties = array( array( name, value, phpdoc ) ) - private_properties = array( array( name, value, phpdoc ) ) - protected_properties = array( array( name, value, phpdoc ) ) - public_properties = array( array( name, value, phpdoc ) ) - static_members = array( array( name, value, phpdoc ) ) - constants = array( array( name, value, phpdoc ) ) - classes = array( array( name, phpdoc ) ) - phpdoc = pre-scanned-phpdoc-string -) - -get_constant_definition(constant [field]) = -array( - file = filename - line_start = - line_end = - name = - value = - phpdoc = -) - -get_global_variable_defintion(name [field]) = -array( - file = - line_start = - line_end = - name = - phpdoc = -) - -We tried to take into account the implementation of each piece of -information, and there are some that are problematic, especially those -regarding constants and global variables (where do we store the extra -information?) - -With pre-scanned-phpdoc-string we mean converting: - -/** - * Blah blah blah - * @param foo ... - */ - -to: - -Blah blah blah -@param foo - -The rest of the phpdoc handling should be left to an extension. -Responsibility: Stig, Andrei, Harald -Time frame: ? - - Component: Redesign of API Versioning Responsibility: ? Time frame: 1 month @@ -170,31 +93,6 @@ Component: Abstract Data Types (ADT) Responsibility: Sterling, Harald Time frame: ? - - -Component: MySQL Extension -Complete rewrite, leveraging the new MySQL 4 / MySQL 5 -features. -Responsibility: Georg Richter, Zak Greant -Timeframe: ? - - -Component: XML -- Rewrite DOMXML and incorporate all (or most of) W3C-DOM2. -- Use the new ZE2 features (Exceptions, setter/getter). -- Add SAX(2), XML Schema. -- XSLT, HTML, XPath, XPointer, DTD Validation will still be - supported, have to find a meaningful API for it. -- Break BC, warn users now. -- Look at the libxml2 patch by lukas schröder and see if we can prevent - memory leaks with it (anyway, getting rid of mem-leaks and intelligent - memory management is on top prio...) -- In the longer term, domxml (or another name, as with todays features - domxml is a little bit misleading) shall be the main xml-class, which - covers most of what's needed for decent XML support in PHP ;) - But there is certainly
[PHP-CVS] cvs: php-src / TODO
helly Fri May 28 05:12:07 2004 EDT Modified files: /php-srcTODO Log: Remove finished tasks http://cvs.php.net/diff.php/php-src/TODO?r1=1.154r2=1.155ty=u Index: php-src/TODO diff -u php-src/TODO:1.154 php-src/TODO:1.155 --- php-src/TODO:1.154 Sun Aug 17 13:52:20 2003 +++ php-src/TODOFri May 28 05:12:07 2004 @@ -7,13 +7,9 @@ dimensional arrays. * Look at replacing c-lib call tolower(). * Make hash API functions work with HASH_OF() to save time. -* Allow to set a default value for call-by-reference-parameters. - eg: function hello ($pallo = NULL) {} * Add configure test to determine if dlsym() requires underscore and set DLSYM_NEEDS_UNDERSCORE accordingly. Perl and zsh have it in configure, for example. (DONE?) -* Allow foreach ($array as $k = $val) syntax. right now we cannot - traverse an array without copying each element. * Native large number support (probably with GNU GMP) * Const'ify APIs. Right now, many functions leave parameters untouched, but don't declare those as const. This makes interaction with other -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / TODO-5.1
helly Fri May 28 05:14:44 2004 EDT Modified files: /php-srcTODO-5.1 Log: Add more outstanding patches http://cvs.php.net/diff.php/php-src/TODO-5.1?r1=1.2r2=1.3ty=u Index: php-src/TODO-5.1 diff -u php-src/TODO-5.1:1.2 php-src/TODO-5.1:1.3 --- php-src/TODO-5.1:1.2Fri May 28 05:03:00 2004 +++ php-src/TODO-5.1Fri May 28 05:14:44 2004 @@ -4,7 +4,9 @@ - Add the patch for referring to existing .ini vars in .ini files. (Andrei) - Implement inheritance rules for type hints. (Marcus) - Implement true/false/NULL as keywords (apply the patch). (Andi, Marcus) + - Implement typehinting for arrays (apply the patch). (Andi, Marcus) - Find a keyword for the if-set-or operator (apply the patch). (Marcus, all) + - Fix ZTS destruction (apply the patch). (Marcus) Build System -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c
derick Fri May 28 06:45:19 2004 EDT Modified files: /php-srcNEWS /php-src/ext/standard basic_functions.c Log: - Fixed ip2long() behavior if an invalid IP address was passed to the function. This makes it possible to distingiush between 255.255.255.255 and a wrong one. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1719r2=1.1720ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1719 php-src/NEWS:1.1720 --- php-src/NEWS:1.1719 Thu May 27 08:28:41 2004 +++ php-src/NEWSFri May 28 06:45:18 2004 @@ -8,6 +8,8 @@ - Changed class type hints for function parameters to not allow the passing of NULL values. (Andi) - Changed tidy_node to tidyNode and removed tidy_exception. (John) +- Fixed ip2long() to return FALSE if an IP address passed to this function + is not valid. (Derick) - Fixed memory leak in memory manager. (Andi) - Fixed problem with exceptions returning from include(). (Dmitry) - Fixed bug #28311 (Transparency detection code is off by 1). http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.668r2=1.669ty=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.668 php-src/ext/standard/basic_functions.c:1.669 --- php-src/ext/standard/basic_functions.c:1.668Wed May 26 14:00:27 2004 +++ php-src/ext/standard/basic_functions.c Fri May 28 06:45:18 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.668 2004/05/26 18:00:27 andi Exp $ */ +/* $Id: basic_functions.c,v 1.669 2004/05/28 10:45:18 derick Exp $ */ #include php.h #include php_streams.h @@ -1247,7 +1247,7 @@ convert_to_string_ex(str); if (Z_STRLEN_PP(str) == 0 || (ip = inet_addr(Z_STRVAL_PP(str))) == INADDR_NONE) { - RETURN_LONG(-1); + RETURN_FALSE; } RETURN_LONG(ntohl(ip)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / TODO-5.1
derick Fri May 28 06:47:15 2004 EDT Modified files: /php-srcTODO-5.1 Log: - Added date/time parser thingy. http://cvs.php.net/diff.php/php-src/TODO-5.1?r1=1.3r2=1.4ty=u Index: php-src/TODO-5.1 diff -u php-src/TODO-5.1:1.3 php-src/TODO-5.1:1.4 --- php-src/TODO-5.1:1.3Fri May 28 05:14:44 2004 +++ php-src/TODO-5.1Fri May 28 06:47:15 2004 @@ -12,3 +12,6 @@ - Implement load order of built-in extensions (apply the patch). (Wez) +Standard Library + + - Implement new time/date parsing and handling functions. (Derick) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard url.c
sesser Fri May 28 07:33:24 2004 EDT Modified files: /php-src/ext/standard url.c Log: Fixed off-by-one in php_parse_url. http://cvs.php.net/diff.php/php-src/ext/standard/url.c?r1=1.79r2=1.80ty=u Index: php-src/ext/standard/url.c diff -u php-src/ext/standard/url.c:1.79 php-src/ext/standard/url.c:1.80 --- php-src/ext/standard/url.c:1.79 Tue Apr 27 15:28:11 2004 +++ php-src/ext/standard/url.c Fri May 28 07:33:23 2004 @@ -15,7 +15,7 @@ | Author: Jim Winstead [EMAIL PROTECTED] | +--+ */ -/* $Id: url.c,v 1.79 2004/04/27 19:28:11 pollita Exp $ */ +/* $Id: url.c,v 1.80 2004/05/28 11:33:23 sesser Exp $ */ #include stdlib.h #include string.h @@ -86,7 +86,7 @@ PHPAPI php_url *php_url_parse(char const *str) { int length = strlen(str); - char port_buf[5]; + char port_buf[6]; php_url *ret = ecalloc(1, sizeof(php_url)); char const *s, *e, *p, *pp, *ue; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard url.c
sesser Fri May 28 07:33:43 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard url.c Log: MFH http://cvs.php.net/diff.php/php-src/ext/standard/url.c?r1=1.58.2.14r2=1.58.2.15ty=u Index: php-src/ext/standard/url.c diff -u php-src/ext/standard/url.c:1.58.2.14 php-src/ext/standard/url.c:1.58.2.15 --- php-src/ext/standard/url.c:1.58.2.14Tue Apr 27 15:28:21 2004 +++ php-src/ext/standard/url.c Fri May 28 07:33:42 2004 @@ -15,7 +15,7 @@ | Author: Jim Winstead [EMAIL PROTECTED] | +--+ */ -/* $Id: url.c,v 1.58.2.14 2004/04/27 19:28:21 pollita Exp $ */ +/* $Id: url.c,v 1.58.2.15 2004/05/28 11:33:42 sesser Exp $ */ #include stdlib.h #include string.h @@ -86,7 +86,7 @@ PHPAPI php_url *php_url_parse(char *str) { int length = strlen(str); - char port_buf[5]; + char port_buf[6]; php_url *ret = ecalloc(1, sizeof(php_url)); char *s, *e, *p, *pp, *ue; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/xsl xsltprocessor.c
chregu Fri May 28 09:04:19 2004 EDT Modified files: /php-src/ext/xslxsltprocessor.c Log: fix memleak in php callbacks http://cvs.php.net/diff.php/php-src/ext/xsl/xsltprocessor.c?r1=1.27r2=1.28ty=u Index: php-src/ext/xsl/xsltprocessor.c diff -u php-src/ext/xsl/xsltprocessor.c:1.27 php-src/ext/xsl/xsltprocessor.c:1.28 --- php-src/ext/xsl/xsltprocessor.c:1.27Tue Apr 20 05:24:23 2004 +++ php-src/ext/xsl/xsltprocessor.c Fri May 28 09:04:19 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: xsltprocessor.c,v 1.27 2004/04/20 09:24:23 chregu Exp $ */ +/* $Id: xsltprocessor.c,v 1.28 2004/05/28 13:04:19 chregu Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -246,7 +246,6 @@ /*fci.function_handler_cache = function_ptr;*/ if (!zend_make_callable(handler, callable TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to call handler %s(), callable); - efree(callable); } else { result = zend_call_function(fci, NULL TSRMLS_CC); @@ -273,6 +272,7 @@ zval_ptr_dtor(retval); } } + efree(callable); zval_dtor(handler); for (i = 0; i nargs - 1; i++) { zval_ptr_dtor(args[i]); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard proc_open.c
wez Fri May 28 09:25:51 2004 EDT Modified files: /php-src/ext/standard proc_open.c Log: Hopefully resolve proc_open build issues. If we need anything more elaborate than this, then we can move to a configure time check as Sascha suggests. http://cvs.php.net/diff.php/php-src/ext/standard/proc_open.c?r1=1.24r2=1.25ty=u Index: php-src/ext/standard/proc_open.c diff -u php-src/ext/standard/proc_open.c:1.24 php-src/ext/standard/proc_open.c:1.25 --- php-src/ext/standard/proc_open.c:1.24 Wed May 26 10:55:32 2004 +++ php-src/ext/standard/proc_open.cFri May 28 09:25:51 2004 @@ -15,12 +15,14 @@ | Author: Wez Furlong [EMAIL PROTECTED] | +--+ */ -/* $Id: proc_open.c,v 1.24 2004/05/26 14:55:32 wez Exp $ */ +/* $Id: proc_open.c,v 1.25 2004/05/28 13:25:51 wez Exp $ */ -#define _XOPEN_SOURCE 500 -#define __EXTENSIONS__ 1 -#define _BSD_SOURCE -#define _OSF_SOURCE +#if defined(__linux__) || defined(sun) || defined(__IRIX__) +# define _BSD_SOURCE /* linux wants this when XOPEN mode is on */ +# define _BSD_COMPAT /* irix: uint */ +# define _XOPEN_SOURCE 500 /* turn on Unix98 */ +# define __EXTENSIONS__1 /* Solaris: uint */ +#endif #include php.h #include stdio.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/gd/libgd gd_topal.c
iliaa Fri May 28 09:47:26 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/gd/libgd gd_topal.c Log: MFH: Fixed bug #28311 (Transparency detection code is off by 1). http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd_topal.c?r1=1.8.2.5r2=1.8.2.6ty=u Index: php-src/ext/gd/libgd/gd_topal.c diff -u php-src/ext/gd/libgd/gd_topal.c:1.8.2.5 php-src/ext/gd/libgd/gd_topal.c:1.8.2.6 --- php-src/ext/gd/libgd/gd_topal.c:1.8.2.5 Thu Dec 25 17:33:03 2003 +++ php-src/ext/gd/libgd/gd_topal.c Fri May 28 09:47:26 2004 @@ -1260,7 +1260,7 @@ * will later be added at the end of the palette as the transparent * index. */ - if ((im-transparent = 0) (im-transparent == *inptr)) { + if ((im-transparent = 0) (im-transparent == *(inptr - 1))) { *outptr++ = im-colorsTotal; continue; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main main.c
iliaa Fri May 28 10:14:26 2004 EDT Modified files: /php-src/main main.c Log: The engine will take care out-of-memory situation for us. http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.603r2=1.604ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.603 php-src/main/main.c:1.604 --- php-src/main/main.c:1.603 Sun May 23 12:02:36 2004 +++ php-src/main/main.c Fri May 28 10:14:26 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.603 2004/05/23 16:02:36 andi Exp $ */ +/* $Id: main.c,v 1.604 2004/05/28 14:14:26 iliaa Exp $ */ /* {{{ includes */ @@ -396,13 +396,8 @@ va_start(args, format); size = vspprintf(buffer, 0, format, args); - if (buffer) { - ret = PHPWRITE(buffer, size); - efree(buffer); - } else { - php_error_docref(NULL TSRMLS_CC, E_ERROR, Out of memory); - ret = 0; - } + ret = PHPWRITE(buffer, size); + efree(buffer); va_end(args); return ret; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/xsl xsltprocessor.c
iliaa Fri May 28 10:17:46 2004 EDT Modified files: /php-src/ext/xslxsltprocessor.c Log: Fixed memory leak on error. http://cvs.php.net/diff.php/php-src/ext/xsl/xsltprocessor.c?r1=1.28r2=1.29ty=u Index: php-src/ext/xsl/xsltprocessor.c diff -u php-src/ext/xsl/xsltprocessor.c:1.28 php-src/ext/xsl/xsltprocessor.c:1.29 --- php-src/ext/xsl/xsltprocessor.c:1.28Fri May 28 09:04:19 2004 +++ php-src/ext/xsl/xsltprocessor.c Fri May 28 10:17:46 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: xsltprocessor.c,v 1.28 2004/05/28 13:04:19 chregu Exp $ */ +/* $Id: xsltprocessor.c,v 1.29 2004/05/28 14:17:46 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -106,6 +106,7 @@ if (zend_hash_get_current_key(parht, string_key, num_key, 1) != HASH_KEY_IS_STRING) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid argument or parameter array); + efree(params); return NULL; } else { if (Z_TYPE_PP(value) != IS_STRING) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase interbase.c
abies Fri May 28 16:11:35 2004 EDT Modified files: /php-src/ext/interbase interbase.c Log: Fix commit/rollback of multi-link transactions Some CS http://cvs.php.net/diff.php/php-src/ext/interbase/interbase.c?r1=1.215r2=1.216ty=u Index: php-src/ext/interbase/interbase.c diff -u php-src/ext/interbase/interbase.c:1.215 php-src/ext/interbase/interbase.c:1.216 --- php-src/ext/interbase/interbase.c:1.215 Sat May 22 14:50:58 2004 +++ php-src/ext/interbase/interbase.c Fri May 28 16:11:34 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: interbase.c,v 1.215 2004/05/22 18:50:58 abies Exp $ */ +/* $Id: interbase.c,v 1.216 2004/05/28 20:11:34 abies Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -28,7 +28,7 @@ #include php.h -#define FILE_REVISION $Revision: 1.215 $ +#define FILE_REVISION $Revision: 1.216 $ #if HAVE_IBASE @@ -721,65 +721,67 @@ zend_hash_del(EG(regular_list), hash, sizeof(hash)); } } + /* ... or a persistent one */ - if (SUCCESS == zend_hash_find(EG(persistent_list), hash, sizeof(hash), (void *) le)) { + switch (zend_hash_find(EG(persistent_list), hash, sizeof(hash), (void *) le)) { static char info[] = { isc_info_base_level, isc_info_end }; char result[8]; ISC_STATUS status[20]; + case SUCCESS: + if (Z_TYPE_P(le) != le_plink) { RETURN_FALSE; } /* check if connection has timed out */ ib_link = (ibase_db_link *) le-ptr; - if (isc_database_info(status, ib_link-handle, sizeof(info), info, sizeof(result), result)) { - zend_hash_del(EG(persistent_list), hash, sizeof(hash)); - } else { + if (!isc_database_info(status, ib_link-handle, sizeof(info), info, sizeof(result), result)) { ZEND_REGISTER_RESOURCE(return_value, ib_link, le_plink); - goto register_link_resource; + break; } - } - - /* no link found, so we have to open one */ - - if (IBG(max_links) != -1 IBG(num_links) = IBG(max_links)) { - _php_ibase_module_error(Too many open links (%ld) TSRMLS_CC, IBG(num_links)); - RETURN_FALSE; - } - - /* create the ib_link */ - if (FAILURE == _php_ibase_attach_db(args, len, largs, db_handle TSRMLS_CC)) { - RETURN_FALSE; - } - - /* use non-persistent if allowed number of persistent links is exceeded */ - if (!persistent || (IBG(max_persistent) != -1 IBG(num_persistent) = IBG(max_persistent))) { - ib_link = (ibase_db_link *) emalloc(sizeof(ibase_db_link)); - ZEND_REGISTER_RESOURCE(return_value, ib_link, le_link); - } else { - list_entry new_le; - - ib_link = (ibase_db_link *) malloc(sizeof(ibase_db_link)); + zend_hash_del(EG(persistent_list), hash, sizeof(hash)); + + default: - /* hash it up */ - Z_TYPE(new_le) = le_plink; - new_le.ptr = ib_link; - if (FAILURE == zend_hash_update(EG(persistent_list), hash, sizeof(hash), - (void *) new_le, sizeof(list_entry), NULL)) { - free(ib_link); + /* no link found, so we have to open one */ + + if (IBG(max_links) != -1 IBG(num_links) = IBG(max_links)) { + _php_ibase_module_error(Too many open links (%ld) TSRMLS_CC, IBG(num_links)); RETURN_FALSE; } - ZEND_REGISTER_RESOURCE(return_value, ib_link, le_plink); - ++IBG(num_persistent); + + /* create the ib_link */ + if (FAILURE == _php_ibase_attach_db(args, len, largs, db_handle TSRMLS_CC)) { + RETURN_FALSE; + } + + /* use non-persistent if allowed number of persistent links is exceeded */ + if (!persistent || (IBG(max_persistent) != -1 IBG(num_persistent) = IBG(max_persistent))) { + ib_link = (ibase_db_link *) emalloc(sizeof(ibase_db_link)); + ZEND_REGISTER_RESOURCE(return_value, ib_link, le_link); + } else { + list_entry new_le; + + ib_link = (ibase_db_link *) malloc(sizeof(ibase_db_link)); + + /* hash it up */ + Z_TYPE(new_le) = le_plink; + new_le.ptr = ib_link; + if (FAILURE == zend_hash_update(EG(persistent_list), hash, sizeof(hash), +
[PHP-CVS] cvs: php-src /ext/tidy tidy.c
johnFri May 28 16:32:52 2004 EDT Modified files: /php-src/ext/tidy tidy.c Log: 'tidy' should not be final, but 'tidyNode' should be. http://cvs.php.net/diff.php/php-src/ext/tidy/tidy.c?r1=1.52r2=1.53ty=u Index: php-src/ext/tidy/tidy.c diff -u php-src/ext/tidy/tidy.c:1.52 php-src/ext/tidy/tidy.c:1.53 --- php-src/ext/tidy/tidy.c:1.52Sun May 23 13:22:21 2004 +++ php-src/ext/tidy/tidy.c Fri May 28 16:32:52 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: tidy.c,v 1.52 2004/05/23 17:22:21 iliaa Exp $ */ +/* $Id: tidy.c,v 1.53 2004/05/28 20:32:52 john Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -93,13 +93,13 @@ } \ } -#define REGISTER_TIDY_CLASS(classname, name, parent) \ +#define REGISTER_TIDY_CLASS(classname, name, parent, __flags) \ { \ zend_class_entry ce; \ INIT_CLASS_ENTRY(ce, # classname, tidy_funcs_ ## name); \ ce.create_object = tidy_object_new_ ## name; \ tidy_ce_ ## name = zend_register_internal_class_ex(ce, parent, NULL TSRMLS_CC); \ - tidy_ce_ ## name-ce_flags |= ZEND_ACC_FINAL_CLASS; \ + tidy_ce_ ## name-ce_flags |= __flags; \ memcpy(tidy_object_handlers_ ## name, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); \ tidy_object_handlers_ ## name.clone_obj = NULL; \ } @@ -895,8 +895,8 @@ ZEND_INIT_MODULE_GLOBALS(tidy, tidy_globals_ctor, tidy_globals_dtor); REGISTER_INI_ENTRIES(); - REGISTER_TIDY_CLASS(tidy, doc, NULL); - REGISTER_TIDY_CLASS(tidyNode, node, NULL); + REGISTER_TIDY_CLASS(tidy, doc, NULL, 0); + REGISTER_TIDY_CLASS(tidyNode, node, NULL, ZEND_ACC_FINAL_CLASS); /* no exceptions for now.. REGISTER_TIDY_CLASS(tidyException, exception, zend_exception_get_default()); */ @@ -939,7 +939,7 @@ php_info_print_table_start(); php_info_print_table_header(2, Tidy support, enabled); php_info_print_table_row(2, libTidy Release, (char *)tidyReleaseDate()); - php_info_print_table_row(2, Extension Version, PHP_TIDY_MODULE_VERSION ($Id: tidy.c,v 1.52 2004/05/23 17:22:21 iliaa Exp $)); + php_info_print_table_row(2, Extension Version, PHP_TIDY_MODULE_VERSION ($Id: tidy.c,v 1.53 2004/05/28 20:32:52 john Exp $)); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase interbase.c php_ibase_includes.h
abies Fri May 28 19:39:33 2004 EDT Modified files: /php-src/ext/interbase interbase.c php_ibase_includes.h Log: Changed default date format to ISO Enable sync flag in connect() http://cvs.php.net/diff.php/php-src/ext/interbase/interbase.c?r1=1.216r2=1.217ty=u Index: php-src/ext/interbase/interbase.c diff -u php-src/ext/interbase/interbase.c:1.216 php-src/ext/interbase/interbase.c:1.217 --- php-src/ext/interbase/interbase.c:1.216 Fri May 28 16:11:34 2004 +++ php-src/ext/interbase/interbase.c Fri May 28 19:39:33 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: interbase.c,v 1.216 2004/05/28 20:11:34 abies Exp $ */ +/* $Id: interbase.c,v 1.217 2004/05/28 23:39:33 abies Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -28,7 +28,7 @@ #include php.h -#define FILE_REVISION $Revision: 1.216 $ +#define FILE_REVISION $Revision: 1.217 $ #if HAVE_IBASE @@ -431,16 +431,16 @@ /* {{{ startup, shutdown and info functions */ PHP_INI_BEGIN() - STD_PHP_INI_BOOLEAN(ibase.allow_persistent, 1, PHP_INI_SYSTEM, OnUpdateLong, allow_persistent, zend_ibase_globals, ibase_globals) + STD_PHP_INI_BOOLEAN(ibase.allow_persistent, 1, PHP_INI_SYSTEM, OnUpdateBool, allow_persistent, zend_ibase_globals, ibase_globals) STD_PHP_INI_ENTRY_EX(ibase.max_persistent, -1, PHP_INI_SYSTEM, OnUpdateLong, max_persistent, zend_ibase_globals, ibase_globals, display_link_numbers) STD_PHP_INI_ENTRY_EX(ibase.max_links, -1, PHP_INI_SYSTEM, OnUpdateLong, max_links, zend_ibase_globals, ibase_globals, display_link_numbers) STD_PHP_INI_ENTRY(ibase.default_db, NULL, PHP_INI_SYSTEM, OnUpdateString, default_db, zend_ibase_globals, ibase_globals) STD_PHP_INI_ENTRY(ibase.default_user, NULL, PHP_INI_ALL, OnUpdateString, default_user, zend_ibase_globals, ibase_globals) STD_PHP_INI_ENTRY(ibase.default_password, NULL, PHP_INI_ALL, OnUpdateString, default_password, zend_ibase_globals, ibase_globals) STD_PHP_INI_ENTRY(ibase.default_charset, NULL, PHP_INI_ALL, OnUpdateString, default_charset, zend_ibase_globals, ibase_globals) - STD_PHP_INI_ENTRY(ibase.timestampformat, %m/%d/%Y %H:%M:%S, PHP_INI_ALL, OnUpdateString, cfg_timestampformat, zend_ibase_globals, ibase_globals) - STD_PHP_INI_ENTRY(ibase.dateformat, %m/%d/%Y, PHP_INI_ALL, OnUpdateString, cfg_dateformat, zend_ibase_globals, ibase_globals) - STD_PHP_INI_ENTRY(ibase.timeformat, %H:%M:%S, PHP_INI_ALL, OnUpdateString, cfg_timeformat, zend_ibase_globals, ibase_globals) + STD_PHP_INI_ENTRY(ibase.timestampformat, IB_DEF_DATE_FMT IB_DEF_TIME_FMT, PHP_INI_ALL, OnUpdateString, cfg_timestampformat, zend_ibase_globals, ibase_globals) + STD_PHP_INI_ENTRY(ibase.dateformat, IB_DEF_DATE_FMT, PHP_INI_ALL, OnUpdateString, cfg_dateformat, zend_ibase_globals, ibase_globals) + STD_PHP_INI_ENTRY(ibase.timeformat, IB_DEF_TIME_FMT, PHP_INI_ALL, OnUpdateString, cfg_timeformat, zend_ibase_globals, ibase_globals) PHP_INI_END() static void php_ibase_init_globals(zend_ibase_globals *ibase_globals) @@ -628,10 +628,10 @@ } /* }}} */ -enum connect_args { DB = 0, USER = 1, PASS = 2, CSET = 3, ROLE = 4, BUF = 0, DLECT = 1 }; +enum connect_args { DB = 0, USER = 1, PASS = 2, CSET = 3, ROLE = 4, BUF = 0, DLECT = 1, SYNC = 2 }; static char const dpb_args[] = { - 0, isc_dpb_user_name, isc_dpb_password, isc_dpb_lc_ctype, isc_dpb_sql_role_name + 0, isc_dpb_user_name, isc_dpb_password, isc_dpb_lc_ctype, isc_dpb_sql_role_name, 0 }; int _php_ibase_attach_db(char **args, int *len, long *largs, isc_db_handle *db TSRMLS_DC) @@ -650,6 +650,9 @@ dpb += sprintf(dpb, %c\2%c%c, isc_dpb_num_buffers, (char)(largs[BUF] 8), (char)(largs[BUF] 0xff)); } + if (largs[SYNC]) { + dpb += sprintf(dpb, %c\1%c, isc_dpb_force_write, largs[SYNC] == isc_spb_prp_wm_sync ? 1 : 0); + } if (isc_attach_database(IB_STATUS, (short)len[DB], args[DB], db, (short)(dpb-dpb_buffer), dpb_buffer)) { _php_ibase_error(TSRMLS_C); return FAILURE; @@ -662,7 +665,7 @@ { char hash[16], *args[] = { NULL, NULL, NULL, NULL, NULL }; int i, len[] = { 0, 0, 0, 0, 0 }; - long largs[] = { 0, 0 }; + long largs[] = { 0, 0, 0 }; PHP_MD5_CTX hash_context; list_entry new_index_ptr, *le; isc_db_handle db_handle = NULL; @@ -670,9 +673,10 @@ RESET_ERRMSG; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |lls, + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |llsl, args[DB], len[DB], args[USER], len[USER], args[PASS], len[PASS], - args[CSET], len[CSET], largs[BUF], largs[DLECT], args[ROLE], len[ROLE])) { + args[CSET],