summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-10-02 17:53:45 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-10-02 17:54:34 +0200
commit2d234d111a012e65ce210d34fb0e876d75059806 (patch)
tree55f04272c7d07ddbb94cbe1859e8c1a6c2d7c4dc
parente0b17ba21987bf59f65411a1210b5e97a2b33a09 (diff)
downloadphp-git-2d234d111a012e65ce210d34fb0e876d75059806.tar.gz
Declare FFI\CType in namespace
Now that it is supported, declare that CType is part of the FFI namespace, not a freestanding class.
-rw-r--r--ext/ffi/ffi.stub.php8
-rw-r--r--ext/ffi/ffi_arginfo.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/ext/ffi/ffi.stub.php b/ext/ffi/ffi.stub.php
index 3b6bce138f..1662caa41b 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 df1ddf8de3..b5162fcce7 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, "\"\"")