mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Fix FFI prototypes (these functions can't return NULL) (#16075)
This commit is contained in:
parent
c7bc91cfcd
commit
a37a3d3d81
2 changed files with 7 additions and 7 deletions
|
@ -15,7 +15,7 @@ namespace {
|
|||
|
||||
public static function scope(string $name): FFI {}
|
||||
|
||||
public static function new(FFI\CType|string $type, bool $owned = true, bool $persistent = false): ?FFI\CData {}
|
||||
public static function new(FFI\CType|string $type, bool $owned = true, bool $persistent = false): FFI\CData {}
|
||||
|
||||
/** @prefer-ref $ptr */
|
||||
public static function free(FFI\CData $ptr): void {}
|
||||
|
@ -24,9 +24,9 @@ namespace {
|
|||
* @param FFI\CData|int|float|bool|null $ptr
|
||||
* @prefer-ref $ptr
|
||||
*/
|
||||
public static function cast(FFI\CType|string $type, $ptr): ?FFI\CData {}
|
||||
public static function cast(FFI\CType|string $type, $ptr): FFI\CData {}
|
||||
|
||||
public static function type(string $type): ?FFI\CType {}
|
||||
public static function type(string $type): FFI\CType {}
|
||||
|
||||
/** @prefer-ref $ptr */
|
||||
public static function typeof(FFI\CData $ptr): FFI\CType {}
|
||||
|
|
8
ext/ffi/ffi_arginfo.h
generated
8
ext/ffi/ffi_arginfo.h
generated
|
@ -1,5 +1,5 @@
|
|||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 1255ed4477be5b4361622aab54ebe37f42b1dada */
|
||||
* Stub hash: d3626f5d39317876fc7d4f240b0758f17f3472c8 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")
|
||||
|
@ -14,7 +14,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_scope, 0, 1, FFI, 0)
|
|||
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_new, 0, 1, FFI\\CData, 1)
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_new, 0, 1, FFI\\CData, 0)
|
||||
ZEND_ARG_OBJ_TYPE_MASK(0, type, FFI\\CType, MAY_BE_STRING, NULL)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owned, _IS_BOOL, 0, "true")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent, _IS_BOOL, 0, "false")
|
||||
|
@ -24,12 +24,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_free, 0, 1, IS_VOID, 0
|
|||
ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, ptr, FFI\\CData, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cast, 0, 2, FFI\\CData, 1)
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cast, 0, 2, FFI\\CData, 0)
|
||||
ZEND_ARG_OBJ_TYPE_MASK(0, type, FFI\\CType, MAY_BE_STRING, NULL)
|
||||
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, ptr)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_type, 0, 1, FFI\\CType, 1)
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_type, 0, 1, FFI\\CType, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue