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 <kocsismat...@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é

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to