Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82474 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18802 invoked from network); 11 Feb 2015 12:43:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2015 12:43:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:46837] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/65-22055-D5E4BD45 for ; Wed, 11 Feb 2015 07:43:09 -0500 Received: (qmail 32596 invoked by uid 89); 11 Feb 2015 12:43:06 -0000 Received: by simscan 1.3.1 ppid: 32590, pid: 32593, t: 0.0730s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.189.147.37) by mail4.serversure.net with ESMTPA; 11 Feb 2015 12:43:06 -0000 Message-ID: <54DB4E59.4030503@lsces.co.uk> Date: Wed, 11 Feb 2015 12:43:05 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54DA162D.1070806@lsces.co.uk> In-Reply-To: <54DA162D.1070806@lsces.co.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] zend_get_parameters_ex rework From: lester@lsces.co.uk (Lester Caine) 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