From 2d234d111a012e65ce210d34fb0e876d75059806 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 Oct 2020 17:53:45 +0200 Subject: [PATCH] Declare FFI\CType in namespace Now that it is supported, declare that CType is part of the FFI namespace, not a freestanding class. --- ext/ffi/ffi.stub.php | 8 ++++++++ ext/ffi/ffi_arginfo.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ext/ffi/ffi.stub.php b/ext/ffi/ffi.stub.php index 3b6bce138f7..1662caa41b9 100644 --- a/ext/ffi/ffi.stub.php +++ b/ext/ffi/ffi.stub.php @@ -2,6 +2,8 @@ /** @generate-function-entries */ +namespace { + final class FFI { public static function cdef(string $code = "", ?string $lib = null): FFI {} @@ -62,6 +64,12 @@ final class FFI public static function isNull(FFI\CData $ptr): bool {} } +} + +namespace FFI { + final class CType { public function getName() : string {} } + +} diff --git a/ext/ffi/ffi_arginfo.h b/ext/ffi/ffi_arginfo.h index df1ddf8de3d..b5162fcce7a 100644 --- a/ext/ffi/ffi_arginfo.h +++ b/ext/ffi/ffi_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: cf08aabbc0e1c50204772ace9285f1c5ef7a22fe */ + * Stub hash: 63219df3f7ccf823350d288bf2dfeba5291a3e51 */ 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, "\"\"")