[PHP-CVS] svn: /php/php-src/trunk/ext/hash/ hash_joaat.c

2010-03-25 Thread Pierre Joye
pajoye   Thu, 25 Mar 2010 10:00:31 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296773

Log:
- init hval

Changed paths:
U   php/php-src/trunk/ext/hash/hash_joaat.c

Modified: php/php-src/trunk/ext/hash/hash_joaat.c
===
--- php/php-src/trunk/ext/hash/hash_joaat.c 2010-03-25 09:51:10 UTC (rev 
296772)
+++ php/php-src/trunk/ext/hash/hash_joaat.c 2010-03-25 10:00:31 UTC (rev 
296773)
@@ -73,7 +73,7 @@
 static php_hash_uint32
 joaat_buf(void *buf, size_t len)
 {
-php_hash_uint32 hval;
+php_hash_uint32 hval = 0;
 size_t i;
 unsigned char *input = (unsigned char *)buf;


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ext/soap/ php_encoding.c php_encoding.h

2010-03-25 Thread Michael Maclean
mgdm Thu, 25 Mar 2010 14:43:15 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296787

Log:
Remove some calls to TSRMLS_FETCH in ext/soap

Changed paths:
U   php/php-src/trunk/ext/soap/php_encoding.c
U   php/php-src/trunk/ext/soap/php_encoding.h

Modified: php/php-src/trunk/ext/soap/php_encoding.c
===
--- php/php-src/trunk/ext/soap/php_encoding.c	2010-03-25 14:34:13 UTC (rev 296786)
+++ php/php-src/trunk/ext/soap/php_encoding.c	2010-03-25 14:43:15 UTC (rev 296787)
@@ -29,60 +29,60 @@
 #include zend_interfaces.h

 /* zval type decode */
-static zval *to_zval_double(encodeTypePtr type, xmlNodePtr data);
-static zval *to_zval_long(encodeTypePtr type, xmlNodePtr data);
-static zval *to_zval_bool(encodeTypePtr type, xmlNodePtr data);
-static zval *to_zval_string(encodeTypePtr type, xmlNodePtr data);
-static zval *to_zval_stringr(encodeTypePtr type, xmlNodePtr data);
-static zval *to_zval_stringc(encodeTypePtr type, xmlNodePtr data);
-static zval *to_zval_map(encodeTypePtr type, xmlNodePtr data);
-static zval *to_zval_null(encodeTypePtr type, xmlNodePtr data);
-static zval *to_zval_base64(encodeTypePtr type, xmlNodePtr data);
-static zval *to_zval_hexbin(encodeTypePtr type, xmlNodePtr data);
+static zval *to_zval_double(encodeTypePtr type, xmlNodePtr data TSRMLS_DC);
+static zval *to_zval_long(encodeTypePtr type, xmlNodePtr data TSRMLS_DC);
+static zval *to_zval_bool(encodeTypePtr type, xmlNodePtr data TSRMLS_DC);
+static zval *to_zval_string(encodeTypePtr type, xmlNodePtr data TSRMLS_DC);
+static zval *to_zval_stringr(encodeTypePtr type, xmlNodePtr data TSRMLS_DC);
+static zval *to_zval_stringc(encodeTypePtr type, xmlNodePtr data TSRMLS_DC);
+static zval *to_zval_map(encodeTypePtr type, xmlNodePtr data TSRMLS_DC);
+static zval *to_zval_null(encodeTypePtr type, xmlNodePtr data TSRMLS_DC);
+static zval *to_zval_base64(encodeTypePtr type, xmlNodePtr data TSRMLS_DC);
+static zval *to_zval_hexbin(encodeTypePtr type, xmlNodePtr data TSRMLS_DC);

-static xmlNodePtr to_xml_long(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_double(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_bool(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
+static xmlNodePtr to_xml_long(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC);
+static xmlNodePtr to_xml_double(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC);
+static xmlNodePtr to_xml_bool(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC);

 /* String encode */
-static xmlNodePtr to_xml_string(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_base64(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_hexbin(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
+static xmlNodePtr to_xml_string(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC);
+static xmlNodePtr to_xml_base64(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC);
+static xmlNodePtr to_xml_hexbin(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC);

 /* Null encode */
-static xmlNodePtr to_xml_null(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
+static xmlNodePtr to_xml_null(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC);

 /* Array encode */
-static xmlNodePtr guess_array_map(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_map(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
+static xmlNodePtr guess_array_map(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC);
+static xmlNodePtr to_xml_map(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC);

-static xmlNodePtr to_xml_list(encodeTypePtr enc, zval *data, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_list1(encodeTypePtr enc, zval *data, int style, xmlNodePtr parent);
+static xmlNodePtr to_xml_list(encodeTypePtr enc, zval *data, int style, xmlNodePtr parent TSRMLS_DC);
+static xmlNodePtr to_xml_list1(encodeTypePtr enc, zval *data, int style, xmlNodePtr parent TSRMLS_DC);

 /* Datetime encode/decode */
-static xmlNodePtr to_xml_datetime_ex(encodeTypePtr type, zval *data, char *format, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_datetime(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_time(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_date(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_gyearmonth(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
-static xmlNodePtr to_xml_gyear(encodeTypePtr type, zval *data, int style, xmlNodePtr parent);
-static 

[PHP-CVS] svn: /php/php-src/trunk/ext/hash/ hash.c

2010-03-25 Thread Rob Richards
rrichardsThu, 25 Mar 2010 15:10:49 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296788

Log:
fix build - there are now 34 algos

Changed paths:
U   php/php-src/trunk/ext/hash/hash.c

Modified: php/php-src/trunk/ext/hash/hash.c
===
--- php/php-src/trunk/ext/hash/hash.c   2010-03-25 14:43:15 UTC (rev 296787)
+++ php/php-src/trunk/ext/hash/hash.c   2010-03-25 15:10:49 UTC (rev 296788)
@@ -43,7 +43,7 @@
int value;
 };

-#define MHASH_NUM_ALGOS 29
+#define MHASH_NUM_ALGOS 34

 static struct mhash_bc_entry mhash_to_hash[MHASH_NUM_ALGOS] = {
{CRC32, crc32, 0},

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ext/hash/tests/ hash_copy_001.phpt

2010-03-25 Thread Martin Jansen
mj   Thu, 25 Mar 2010 16:05:27 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296791

Log:
Fixed test for the recently added algorithmus and made it more
debuggable by adding the names of the algorithmus to the output.

Changed paths:
U   php/php-src/trunk/ext/hash/tests/hash_copy_001.phpt

Modified: php/php-src/trunk/ext/hash/tests/hash_copy_001.phpt
===
--- php/php-src/trunk/ext/hash/tests/hash_copy_001.phpt	2010-03-25 15:36:37 UTC (rev 296790)
+++ php/php-src/trunk/ext/hash/tests/hash_copy_001.phpt	2010-03-25 16:05:27 UTC (rev 296791)
@@ -6,6 +6,7 @@
 $algos = hash_algos();

 foreach ($algos as $algo) {
+	var_dump($algo);
 	$orig = hash_init($algo);
 	hash_update($orig, bI can't remember anything);
 	$copy = hash_copy($orig);
@@ -15,6 +16,7 @@
 }

 foreach ($algos as $algo) {
+	var_dump($algo);
 	$orig = hash_init($algo);
 	hash_update($orig, bI can't remember anything);
 	$copy = hash_copy($orig);
@@ -27,172 +29,274 @@
 echo Done\n;
 ?
 --EXPECTF--
+string(3) md2
 string(32) d5ac4ffd08f6a57b9bd402b8068392ff
 string(32) d5ac4ffd08f6a57b9bd402b8068392ff
+string(3) md4
 string(32) 302c45586b53a984bd3a1237cb81c15f
 string(32) 302c45586b53a984bd3a1237cb81c15f
+string(3) md5
 string(32) e35759f6ea35db254e415b5332269435
 string(32) e35759f6ea35db254e415b5332269435
+string(4) sha1
 string(40) 29f62a228f726cd728efa7a0ac6a2aba318baf15
 string(40) 29f62a228f726cd728efa7a0ac6a2aba318baf15
+string(6) sha224
 string(56) 51fd0aa76a00b4a86103895cad5c7c2651ec7da9f4fc1e50c43ede29
 string(56) 51fd0aa76a00b4a86103895cad5c7c2651ec7da9f4fc1e50c43ede29
+string(6) sha256
 string(64) d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba
 string(64) d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba
+string(6) sha384
 string(96) 6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3
 string(96) 6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3
+string(6) sha512
 string(128) caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13
 string(128) caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13
+string(9) ripemd128
 string(32) 5f1bc5f5aeaf747574dd34a6535cd94a
 string(32) 5f1bc5f5aeaf747574dd34a6535cd94a
+string(9) ripemd160
 string(40) 02a2a535ee10404c6b5cf9acb178a04fbed67269
 string(40) 02a2a535ee10404c6b5cf9acb178a04fbed67269
+string(9) ripemd256
 string(64) 547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2
 string(64) 547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2
+string(9) ripemd320
 string(80) 785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6
 string(80) 785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6
+string(9) whirlpool
 string(128) 6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082
 string(128) 6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082
+string(10) tiger128,3
 string(32) a92be6c58be7688dc6cf9585a47aa625
 string(32) a92be6c58be7688dc6cf9585a47aa625
+string(10) tiger160,3
 string(40) a92be6c58be7688dc6cf9585a47aa62535fc2482
 string(40) a92be6c58be7688dc6cf9585a47aa62535fc2482
+string(10) tiger192,3
 string(48) a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c
 string(48) a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c
+string(10) tiger128,4
 string(32) 32fb748ef5a36ca222511bcb99b044ee
 string(32) 32fb748ef5a36ca222511bcb99b044ee
+string(10) tiger160,4
 string(40) 32fb748ef5a36ca222511bcb99b044ee1d740bf3
 string(40) 32fb748ef5a36ca222511bcb99b044ee1d740bf3
+string(10) tiger192,4
 string(48) 32fb748ef5a36ca222511bcb99b044ee1d740bf300593703
 string(48) 32fb748ef5a36ca222511bcb99b044ee1d740bf300593703
+string(6) snefru
 string(64) fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26
 string(64) fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26
+string(9) snefru256
 string(64) fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26
 string(64) fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26
+string(4) gost
 string(64) 5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5
 string(64) 5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5
+string(7) adler32
 string(8) 6f7c0928
 string(8) 6f7c0928
+string(5) crc32
 string(8) e5cfc160
 string(8) e5cfc160
+string(6) crc32b
 string(8) 69147a4e
 string(8) 69147a4e
+string(7) salsa10
 string(128) aa39bc97c2bbcb0d79bbebfddca0bf8d769c7919c9e537e456efb5fc67f33f161758dd9da3ddcec7bbbd9c04553a03f74d2dbd26175dd75c353e9300674caa4e
 string(128) 

Re: [PHP-CVS] svn: /php/php-src/trunk/ext/hash/tests/ hash_copy_001.phpt

2010-03-25 Thread Pierre Joye
hi Martin,

Would it not be nicer to split the tests per algorithm and use one
line per iteration? Such verbose output are not very useful to debug.

Cheers,

On Thu, Mar 25, 2010 at 5:05 PM, Martin Jansen m...@php.net wrote:
 mj                                       Thu, 25 Mar 2010 16:05:27 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=296791

 Log:
 Fixed test for the recently added algorithmus and made it more
 debuggable by adding the names of the algorithmus to the output.

 Changed paths:
    U   php/php-src/trunk/ext/hash/tests/hash_copy_001.phpt


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/ resourcebundle.c resourcebundle_class.c

2010-03-25 Thread Stanislav Malyshev
stas Thu, 25 Mar 2010 19:17:17 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296799

Log:
fix the protos

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c
U   
php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle_class.c

Modified: php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c
===
--- php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c   
2010-03-25 17:47:33 UTC (rev 296798)
+++ php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c   
2010-03-25 19:17:17 UTC (rev 296799)
@@ -1,4 +1,4 @@
-/*
+   /*
+--+
| PHP Version 5|
+--+

Modified: 
php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle_class.c
===
--- php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle_class.c 
2010-03-25 17:47:33 UTC (rev 296798)
+++ php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle_class.c 
2010-03-25 19:17:17 UTC (rev 296799)
@@ -126,7 +126,7 @@
 ZEND_END_ARG_INFO()
 /* }}} */

-/* {{{ proto void ResourceBundle::__construct( string $bundlename [, string 
$locale [, bool $fallback = true ]] )
+/* {{{ proto void ResourceBundle::__construct( string $locale [, string 
$bundlename [, bool $fallback = true ]] )
  * ResourceBundle object constructor
  */
 PHP_METHOD( ResourceBundle, __construct )
@@ -136,8 +136,9 @@
 }
 /* }}} */

-/* {{{ proto ResourceBundle ResourceBundle::create( string $bundlename [, 
string $locale [, bool $fallback = true ]] )
-proto ResourceBundle resourcebundle_create( string $bundlename [, string 
$locale [, bool $fallback = true ]] ) */
+/* {{{ proto ResourceBundle ResourceBundle::create( string $locale [, string 
$bundlename [, bool $fallback = true ]] )
+proto ResourceBundle resourcebundle_create( string $locale [, string 
$bundlename [, bool $fallback = true ]] )
+*/
 PHP_FUNCTION( resourcebundle_create )
 {
object_init_ex( return_value, ResourceBundle_ce_ptr );

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ext/soap/ php_encoding.c php_encoding.h php_packet_soap.c soap.c

2010-03-25 Thread Michael Maclean
mgdm Thu, 25 Mar 2010 20:06:05 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296820

Log:
Remove some more calls to TSRMLS_FETCH()

Changed paths:
U   php/php-src/trunk/ext/soap/php_encoding.c
U   php/php-src/trunk/ext/soap/php_encoding.h
U   php/php-src/trunk/ext/soap/php_packet_soap.c
U   php/php-src/trunk/ext/soap/soap.c

Modified: php/php-src/trunk/ext/soap/php_encoding.c
===
--- php/php-src/trunk/ext/soap/php_encoding.c	2010-03-25 20:03:00 UTC (rev 296819)
+++ php/php-src/trunk/ext/soap/php_encoding.c	2010-03-25 20:06:05 UTC (rev 296820)
@@ -358,11 +358,10 @@
 	return 0;
 }

-static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xmlNodePtr parent, int check_class_map)
+static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xmlNodePtr parent, int check_class_map TSRMLS_DC)
 {
 	xmlNodePtr node = NULL;
 	int add_type = 0;
-	TSRMLS_FETCH();

 	/* Special handling of class SoapVar */
 	if (data 
@@ -407,9 +406,9 @@
 		}

 		if (zend_hash_find(ht, enc_value, sizeof(enc_value), (void **)zdata) == FAILURE) {
-			node = master_to_xml(enc, NULL, style, parent);
+			node = master_to_xml(enc, NULL, style, parent TSRMLS_CC);
 		} else {
-			node = master_to_xml(enc, *zdata, style, parent);
+			node = master_to_xml(enc, *zdata, style, parent TSRMLS_CC);
 		}

 		if (style == SOAP_ENCODED || (SOAP_GLOBAL(sdl)  encode != enc)) {
@@ -495,15 +494,14 @@
 	return node;
 }

-xmlNodePtr master_to_xml(encodePtr encode, zval *data, int style, xmlNodePtr parent)
+xmlNodePtr master_to_xml(encodePtr encode, zval *data, int style, xmlNodePtr parent TSRMLS_DC)
 {
-	return master_to_xml_int(encode, data, style, parent, 1);
+	return master_to_xml_int(encode, data, style, parent, 1 TSRMLS_CC);
 }

-static zval *master_to_zval_int(encodePtr encode, xmlNodePtr data)
+static zval *master_to_zval_int(encodePtr encode, xmlNodePtr data TSRMLS_DC)
 {
 	zval *ret = NULL;
-	TSRMLS_FETCH();

 	if (SOAP_GLOBAL(typemap)) {
 		if (encode-details.type_str) {
@@ -552,9 +550,8 @@
 	return ret;
 }

-zval *master_to_zval(encodePtr encode, xmlNodePtr data)
+zval *master_to_zval(encodePtr encode, xmlNodePtr data TSRMLS_DC)
 {
-	TSRMLS_FETCH();
 	data = check_and_resolve_href(data);

 	if (encode == NULL) {
@@ -584,7 +581,7 @@
 			}
 		}
 	}
-	return master_to_zval_int(encode, data);
+	return master_to_zval_int(encode, data TSRMLS_CC);
 }

 xmlNodePtr to_xml_user(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC)
@@ -1264,7 +1261,7 @@

 	while (node != NULL) {
 		if (get_zval_property(ret, (char*)node-name TSRMLS_CC) == NULL) {
-			zval* val = master_to_zval(get_conversion(XSD_ANYXML), node);
+			zval* val = master_to_zval(get_conversion(XSD_ANYXML), node TSRMLS_CC);

 			if (any  Z_TYPE_P(any) != IS_ARRAY) {
 /* Convert into array */
@@ -1283,7 +1280,7 @@
 			if (Z_TYPE_P(val) == IS_STRING  *Z_STRVAL_P(val) == '') {
 name = NULL;
 while (node-next != NULL) {
-	zval* val2 = master_to_zval(get_conversion(XSD_ANYXML), node-next);
+	zval* val2 = master_to_zval(get_conversion(XSD_ANYXML), node-next TSRMLS_CC);
 	if (Z_TYPE_P(val2) != IS_STRING ||  *Z_STRVAL_P(val) != '') {
 		break;
 	}
@@ -1355,19 +1352,19 @@
 		if (model-u.element-fixed  strcmp(model-u.element-fixed, (char*)r_node-children-content) != 0) {
 			soap_error3(E_ERROR, Encoding: Element '%s' has fixed value '%s' (value '%s' is not allowed), model-u.element-name, model-u.element-fixed, r_node-children-content);
 		}
-		val = master_to_zval(model-u.element-encode, r_node);
+		val = master_to_zval(model-u.element-encode, r_node TSRMLS_CC);
 	} else if (model-u.element-fixed) {
 		xmlNodePtr dummy = xmlNewNode(NULL, BAD_CAST(BOGUS));
 		xmlNodeSetContent(dummy, BAD_CAST(model-u.element-fixed));
-		val = master_to_zval(model-u.element-encode, dummy);
+		val = master_to_zval(model-u.element-encode, dummy TSRMLS_CC);
 		xmlFreeNode(dummy);
 	} else if (model-u.element-def  !model-u.element-nillable) {
 		xmlNodePtr dummy = xmlNewNode(NULL, BAD_CAST(BOGUS));
 		xmlNodeSetContent(dummy, BAD_CAST(model-u.element-def));
-		val = master_to_zval(model-u.element-encode, dummy);
+		val = master_to_zval(model-u.element-encode, dummy TSRMLS_CC);
 		xmlFreeNode(dummy);
 	} else {
-		val = master_to_zval(model-u.element-encode, r_node);
+		val = master_to_zval(model-u.element-encode, r_node TSRMLS_CC);
 	}
 	if ((node = get_node(node-next, model-u.element-name)) != NULL) {
 		zval *array;
@@ -1380,19 +1377,19 @@
 if (model-u.element-fixed  strcmp(model-u.element-fixed, (char*)node-children-content) != 0) {
 	soap_error3(E_ERROR, Encoding: Element '%s' has fixed value '%s' (value '%s' is not allowed), model-u.element-name, model-u.element-fixed, node-children-content);
 			

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/ resourcebundle.c resourcebundle_class.c

2010-03-25 Thread Johannes Schlüter
On Thu, 2010-03-25 at 19:17 +, Stanislav Malyshev wrote:
 Changed paths:
 U   php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c
 U   
 php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle_class.c

what about our newtrunk?

johannes




-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/ resourcebundle.c resourcebundle_class.c

2010-03-25 Thread Stanislav Malyshev

Hi!


 U   php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c
 U   
php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle_class.c


what about our newtrunk?


Will follow soon, I didn't re-organize my repos yet, sorry.
--
Stanislav Malyshev, Zend Software Architect
s...@zend.com   http://www.zend.com/
(408)253-8829   MSN: s...@zend.com

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/trunk/ext/intl/resourcebundle/ resourcebundle_class.c

2010-03-25 Thread Stanislav Malyshev
stas Thu, 25 Mar 2010 22:30:26 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296825

Log:
fix protos

Changed paths:
U   php/php-src/trunk/ext/intl/resourcebundle/resourcebundle_class.c

Modified: php/php-src/trunk/ext/intl/resourcebundle/resourcebundle_class.c
===
--- php/php-src/trunk/ext/intl/resourcebundle/resourcebundle_class.c
2010-03-25 22:22:51 UTC (rev 296824)
+++ php/php-src/trunk/ext/intl/resourcebundle/resourcebundle_class.c
2010-03-25 22:30:26 UTC (rev 296825)
@@ -126,7 +126,7 @@
 ZEND_END_ARG_INFO()
 /* }}} */

-/* {{{ proto void ResourceBundle::__construct( string $bundlename [, string 
$locale [, bool $fallback = true ]] )
+/* {{{ proto void ResourceBundle::__construct( string $locale [, string 
$bundlename [, bool $fallback = true ]] )
  * ResourceBundle object constructor
  */
 PHP_METHOD( ResourceBundle, __construct )
@@ -136,8 +136,9 @@
 }
 /* }}} */

-/* {{{ proto ResourceBundle ResourceBundle::create( string $bundlename [, 
string $locale [, bool $fallback = true ]] )
-proto ResourceBundle resourcebundle_create( string $bundlename [, string 
$locale [, bool $fallback = true ]] ) */
+/* {{{ proto ResourceBundle ResourceBundle::create( string $locale [, string 
$bundlename [, bool $fallback = true ]] )
+proto ResourceBundle resourcebundle_create( string $locale [, string 
$bundlename [, bool $fallback = true ]] )
+*/
 PHP_FUNCTION( resourcebundle_create )
 {
object_init_ex( return_value, ResourceBundle_ce_ptr );

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/date/lib/parse_date.c branches/PHP_5_3/ext/date/lib/parse_date.re branches/PHP_5_3/ext/date/lib/parse_iso_intervals.c branches/P

2010-03-25 Thread Adam Harvey
aharvey  Fri, 26 Mar 2010 04:31:26 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296828

Log:
Fixed bug #51393 (DateTime::createFromFormat() fails if format string contains 
timezone).

Bug: http://bugs.php.net/51393 (Assigned) DateTime::createFromFormat() fails if 
format string contains timezone
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.c
U   php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.re
U   php/php-src/branches/PHP_5_3/ext/date/lib/parse_iso_intervals.c
U   php/php-src/branches/PHP_5_3/ext/date/lib/parse_iso_intervals.re
A   php/php-src/branches/PHP_5_3/ext/date/tests/bug51393.phpt
U   php/php-src/trunk/ext/date/lib/parse_date.c
U   php/php-src/trunk/ext/date/lib/parse_date.re
U   php/php-src/trunk/ext/date/lib/parse_iso_intervals.c
U   php/php-src/trunk/ext/date/lib/parse_iso_intervals.re
A   php/php-src/trunk/ext/date/tests/bug51393.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2010-03-25 23:02:20 UTC (rev 296827)
+++ php/php-src/branches/PHP_5_3/NEWS	2010-03-26 04:31:26 UTC (rev 296828)
@@ -9,6 +9,8 @@
 - Fixed a NULL pointer dereference when processing invalid XML-RPC
   requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)

+- Fixed bug #51393 (DateTime::createFromFormat() fails if format string contains
+  timezone). (Adam)
 - Fixed bug #51338 (URL-Rewriter is still enabled if use_only_cookies is
   on). (Ilia, j dot jeising at gmail dot com)
 - Fixed bug #51269 (zlib.output_compression Overwrites Vary Header). (Adam)

Modified: php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.c
===
--- php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.c	2010-03-25 23:02:20 UTC (rev 296827)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.c	2010-03-26 04:31:26 UTC (rev 296828)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Sun Mar  7 18:37:37 2010 */
+/* Generated by re2c 0.13.5 on Fri Mar 26 12:00:44 2010 */
 #line 1 ext/date/lib/parse_date.re
 /*
+--+
@@ -526,7 +526,7 @@
 	char *begin = *ptr, *end;
 	long  tmp;

-	while (**ptr != '\0') {
+	while (isdigit(**ptr) || **ptr == ':') {
 		++*ptr;
 	}
 	end = *ptr;

Modified: php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.re
===
--- php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.re	2010-03-25 23:02:20 UTC (rev 296827)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.re	2010-03-26 04:31:26 UTC (rev 296828)
@@ -524,7 +524,7 @@
 	char *begin = *ptr, *end;
 	long  tmp;

-	while (**ptr != '\0') {
+	while (isdigit(**ptr) || **ptr == ':') {
 		++*ptr;
 	}
 	end = *ptr;

Modified: php/php-src/branches/PHP_5_3/ext/date/lib/parse_iso_intervals.c
===
--- php/php-src/branches/PHP_5_3/ext/date/lib/parse_iso_intervals.c	2010-03-25 23:02:20 UTC (rev 296827)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/parse_iso_intervals.c	2010-03-26 04:31:26 UTC (rev 296828)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Sun Mar  7 14:12:01 2010 */
+/* Generated by re2c 0.13.5 on Fri Mar 26 12:12:03 2010 */
 #line 1 ext/date/lib/parse_iso_intervals.re
 /*
+--+
@@ -183,7 +183,7 @@
 	char *begin = *ptr, *end;
 	long  tmp;

-	while (**ptr != '\0') {
+	while (isdigit(**ptr) || **ptr == ':') {
 		++*ptr;
 	}
 	end = *ptr;

Modified: php/php-src/branches/PHP_5_3/ext/date/lib/parse_iso_intervals.re
===
--- php/php-src/branches/PHP_5_3/ext/date/lib/parse_iso_intervals.re	2010-03-25 23:02:20 UTC (rev 296827)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/parse_iso_intervals.re	2010-03-26 04:31:26 UTC (rev 296828)
@@ -181,7 +181,7 @@
 	char *begin = *ptr, *end;
 	long  tmp;

-	while (**ptr != '\0') {
+	while (isdigit(**ptr) || **ptr == ':') {
 		++*ptr;
 	}
 	end = *ptr;

Added: php/php-src/branches/PHP_5_3/ext/date/tests/bug51393.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug51393.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug51393.phpt	2010-03-26 04:31:26 UTC (rev 296828)
@@ -0,0 +1,73 @@
+--TEST--
+Bug #51393 (DateTime::createFromFormat() fails if format string contains timezone)
+--FILE--
+?php
+$dt = DateTime::createFromFormat('O', '+0800');
+var_dump($dt-getOffset());
+
+$dt = DateTime::createFromFormat('P', '+08:00');
+var_dump($dt-getOffset());
+
+$dt = DateTime::createFromFormat('O', '-0800');
+var_dump($dt-getOffset());
+
+$dt =