parsing API "z!" broken

From: Date: Tue, 06 Jan 2009 13:49:07 +0000
Subject: parsing API "z!" broken
Groups: php.internals.win 
Request: Send a blank email to internals-win+get-354@lists.php.net to get a copy of this message
hi, I met a weird bug yesterday, using "z!" with unset variables works on unix but fail on windows. For example: PHP_FUNCTION(foo) { char *a; int a_len; long b = 0; zval *authns = NULL, *addtl = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz!z!", &a, &a_len, &b, &c, &d) == FAILURE) { return; } case 1: foo("a", 1, $c, $d); case 2: $c = NULL; $d = NULL; foo("a", 1, $c, $d); Case 1: c and d will be a NULL Case 2: c and d will be valid zval ptr I did not test yet under 5.3 linux but similar cases work well with 5.2. Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.internals.win (#354) next »