Re: zend_get_parameters_ex rework

From: Date: Wed, 11 Feb 2015 12:43:05 +0000
Subject: Re: zend_get_parameters_ex rework
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 10/02/15 14:31, Lester Caine wrote:
> in interbase/ibase_blobs.c
> 
>> 	zval *blob_arg, *string_arg;
>> 	ibase_blob *ib_blob;
>>
>> 	RESET_ERRMSG;
>>
>> 	if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &blob_arg, &string_arg) ==
>> FAILURE) {
>> 		WRONG_PARAM_COUNT;
>> 	}
>>
>> 	ZEND_FETCH_RESOURCE(ib_blob, ibase_blob *, blob_arg, -1, "Interbase blob",
>> le_blob);
> 
> I've got that if changes to
> 
>>       if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr",
>> &blob_arg, &string_arg)) { 
>>               return;
>>  	}
> 
> But I suspect I need to change the *string_arg to a character string so
> 'rc' and add a string_len field. At least that is what I think I'm
> seeing from the samples I have found.

OK I've got a patch for master, but I know that the changes are not
complete!

http://hg.lsces.org.uk/hg/php-src/rev/8ec9101f59b6

I've still got a question about the &string_arg on line 1.9 and if it
should be changed to a string but that change needs working through the
following code.

Also is what I'm doing here php7 only? so should there be wrappers for a
PHP5 build?

I think that all this leaves is all the complaints about 'NULL' and integer
initialization makes integer from pointer without a cast
and
assignment makes integer from pointer without a cast

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk


Thread (13 messages)

« previous php.internals (#82474) next »