Skip to content

Commit ab4c597

Browse files
committed
Fix the signature of FFI::typeof() and FFI::memcmp()
1 parent c1d7661 commit ab4c597

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ext/ffi/ffi.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static function cast(FFI\CType|string $type, $ptr): ?FFI\CData {}
2626
public static function type(string $type): ?FFI\CType {}
2727

2828
/** @prefer-ref $ptr */
29-
public static function typeof(FFI\CData $ptr): ?FFI\CType {}
29+
public static function typeof(FFI\CData $ptr): FFI\CType {}
3030

3131
public static function arrayType(FFI\CType $type, array $dimensions): ?FFI\CType {}
3232

@@ -58,7 +58,7 @@ public static function memcpy(FFI\CData $to, $from, int $size): void {}
5858
* @prefer-ref $ptr2
5959
* @param string|FFI\CData $ptr2
6060
*/
61-
public static function memcmp($ptr1, $ptr2, int $size): ?int {}
61+
public static function memcmp($ptr1, $ptr2, int $size): int {}
6262

6363
/** @prefer-ref $ptr */
6464
public static function memset(FFI\CData $ptr, int $value, int $size): void {}

ext/ffi/ffi_arginfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: f106049da816d8fef7bbfb40c5335245b57044e0 */
2+
* Stub hash: 677c62adf295003b4b2d273995a4bda623d507bf */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")
@@ -33,7 +33,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_type, 0, 1, FFI\\CType,
3333
ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0)
3434
ZEND_END_ARG_INFO()
3535

36-
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_typeof, 0, 1, FFI\\CType, 1)
36+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_typeof, 0, 1, FFI\\CType, 0)
3737
ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, ptr, FFI\\CData, 0)
3838
ZEND_END_ARG_INFO()
3939

@@ -58,7 +58,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_memcpy, 0, 3, IS_VOID,
5858
ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
5959
ZEND_END_ARG_INFO()
6060

61-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_memcmp, 0, 3, IS_LONG, 1)
61+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_memcmp, 0, 3, IS_LONG, 0)
6262
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, ptr1)
6363
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, ptr2)
6464
ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)

0 commit comments

Comments
 (0)