Re: Arginfo Mismatch For Optional Parameters

From: Date: Mon, 31 Jul 2023 20:12:46 +0000
Subject: Re: Arginfo Mismatch For Optional Parameters
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-120874@lists.php.net to get a copy of this message
Máté, Thanks! That was the issue :). All of the c code, including arginfo and stubs are auto generated on my end. I didn't know you could use stubs to generate the arg info, so will need to look into it later. Just for reference the following works: ZEND_BEGIN_ARG_INFO_EX(arginfo_vector3__construct, 0, 0, 0) ZEND_ARG_TYPE_MASK(0, x, MAY_BE_DOUBLE|MAY_BE_NULL, "0") ZEND_ARG_TYPE_MASK(0, y, MAY_BE_DOUBLE|MAY_BE_NULL, "0") ZEND_ARG_TYPE_MASK(0, z, MAY_BE_DOUBLE|MAY_BE_NULL, "0") ZEND_END_ARG_INFO() Thanks, Joseph Montanez On Mon, Jul 31, 2023 at 12:38 PM Máté Kocsis <kocsismate90@gmail.com> wrote: > > Hi, > > The problem is that your arginfo declares parameters of type double, while you accept the > double|null type in ZPP. > > P.s. i'm not sure based on your message whether you use stubs for declaring symbols, but > if that's not the case, then doing so is highly recommended.. You can find plenty of examples > in php-src (*.stub.php files). > > Regards, > Máté

« previous php.internals (#120874) next »