Skip to content

Commit 22ab18c

Browse files
committed
Update ext/ffi parameter names
Closes GH-6282.
1 parent 68195bd commit 22ab18c

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

ext/ffi/ffi.stub.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static function cdef(string $code = "", ?string $lib = null): FFI {}
1010

1111
public static function load(string $filename): ?FFI {}
1212

13-
public static function scope(string $scope_name): ?FFI {}
13+
public static function scope(string $name): ?FFI {}
1414

1515
public static function new(FFI\CType|string $type, bool $owned = true, bool $persistent = false): ?FFI\CData {}
1616

@@ -28,7 +28,7 @@ public static function type(string $type): ?FFI\CType {}
2828
/** @prefer-ref $ptr */
2929
public static function typeof(FFI\CData $ptr): ?FFI\CType {}
3030

31-
public static function arrayType(FFI\CType $type, array $dims): ?FFI\CType {}
31+
public static function arrayType(FFI\CType $type, array $dimensions): ?FFI\CType {}
3232

3333
/** @prefer-ref $ptr */
3434
public static function addr(FFI\CData $ptr): FFI\CData {}
@@ -40,11 +40,11 @@ public static function sizeof(object $ptr): ?int {}
4040
public static function alignof(object $ptr): ?int {}
4141

4242
/**
43-
* @param FFI\CData|string $src
44-
* @prefer-ref $dst
45-
* @prefer-ref $src
43+
* @param FFI\CData|string $from
44+
* @prefer-ref $to
45+
* @prefer-ref $from
4646
*/
47-
public static function memcpy(FFI\CData $dst, $src, int $size): void {}
47+
public static function memcpy(FFI\CData $to, $from, int $size): void {}
4848

4949
/**
5050
* @prefer-ref $ptr1
@@ -55,7 +55,7 @@ public static function memcpy(FFI\CData $dst, $src, int $size): void {}
5555
public static function memcmp($ptr1, $ptr2, int $size): ?int {}
5656

5757
/** @prefer-ref $ptr */
58-
public static function memset(FFI\CData $ptr, int $ch, int $size): void {}
58+
public static function memset(FFI\CData $ptr, int $value, int $size): void {}
5959

6060
/** @prefer-ref $ptr */
6161
public static function string(FFI\CData $ptr, ?int $size = null): ?string {}

ext/ffi/ffi_arginfo.h

Lines changed: 6 additions & 6 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: 63219df3f7ccf823350d288bf2dfeba5291a3e51 */
2+
* Stub hash: abd3bc186ae3f71f2b7eb1d47f3b6bab84fb2bda */
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, "\"\"")
@@ -11,7 +11,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_load, 0, 1, FFI, 1)
1111
ZEND_END_ARG_INFO()
1212

1313
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_scope, 0, 1, FFI, 1)
14-
ZEND_ARG_TYPE_INFO(0, scope_name, IS_STRING, 0)
14+
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
1515
ZEND_END_ARG_INFO()
1616

1717
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_new, 0, 1, FFI\\CData, 1)
@@ -39,7 +39,7 @@ ZEND_END_ARG_INFO()
3939

4040
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_arrayType, 0, 2, FFI\\CType, 1)
4141
ZEND_ARG_OBJ_INFO(0, type, FFI\\CType, 0)
42-
ZEND_ARG_TYPE_INFO(0, dims, IS_ARRAY, 0)
42+
ZEND_ARG_TYPE_INFO(0, dimensions, IS_ARRAY, 0)
4343
ZEND_END_ARG_INFO()
4444

4545
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_addr, 0, 1, FFI\\CData, 0)
@@ -53,8 +53,8 @@ ZEND_END_ARG_INFO()
5353
#define arginfo_class_FFI_alignof arginfo_class_FFI_sizeof
5454

5555
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_memcpy, 0, 3, IS_VOID, 0)
56-
ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, dst, FFI\\CData, 0)
57-
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, src)
56+
ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, to, FFI\\CData, 0)
57+
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, from)
5858
ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
5959
ZEND_END_ARG_INFO()
6060

@@ -66,7 +66,7 @@ ZEND_END_ARG_INFO()
6666

6767
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_memset, 0, 3, IS_VOID, 0)
6868
ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, ptr, FFI\\CData, 0)
69-
ZEND_ARG_TYPE_INFO(0, ch, IS_LONG, 0)
69+
ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0)
7070
ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
7171
ZEND_END_ARG_INFO()
7272

0 commit comments

Comments
 (0)