From: Nikita Popov Date: Thu, 31 Oct 2019 11:17:04 +0000 (+0100) Subject: Add stubs for WeakReference X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f8b7668386a7c4ede409e6ab7d4d93ce9316def;p=php Add stubs for WeakReference --- diff --git a/Zend/zend_weakrefs.c b/Zend/zend_weakrefs.c index aae1998d6c..0d6b9345f6 100644 --- a/Zend/zend_weakrefs.c +++ b/Zend/zend_weakrefs.c @@ -18,6 +18,7 @@ #include "zend_interfaces.h" #include "zend_objects_API.h" #include "zend_weakrefs.h" +#include "zend_weakrefs_arginfo.h" typedef struct _zend_weakref { zend_object *referent; @@ -140,13 +141,6 @@ static ZEND_COLD void zend_weakref_no_unset(zend_object *object, zend_string *me zend_weakref_unsupported("properties"); } -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(zend_weakref_create_arginfo, 0, 1, WeakReference, 0) - ZEND_ARG_TYPE_INFO(0, referent, IS_OBJECT, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(zend_weakref_get_arginfo, 0, 0, IS_OBJECT, 1) -ZEND_END_ARG_INFO() - ZEND_COLD ZEND_METHOD(WeakReference, __construct) { zend_throw_error(NULL, @@ -178,9 +172,9 @@ ZEND_METHOD(WeakReference, get) } static const zend_function_entry zend_weakref_methods[] = { - ZEND_ME(WeakReference, __construct, NULL, ZEND_ACC_PUBLIC) - ZEND_ME(WeakReference, create, zend_weakref_create_arginfo, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - ZEND_ME(WeakReference, get, zend_weakref_get_arginfo, ZEND_ACC_PUBLIC) + ZEND_ME(WeakReference, __construct, arginfo_class_WeakReference___construct, ZEND_ACC_PUBLIC) + ZEND_ME(WeakReference, create, arginfo_class_WeakReference_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(WeakReference, get, arginfo_class_WeakReference_get, ZEND_ACC_PUBLIC) ZEND_FE_END }; diff --git a/Zend/zend_weakrefs.stub.php b/Zend/zend_weakrefs.stub.php new file mode 100644 index 0000000000..52ae81c7b8 --- /dev/null +++ b/Zend/zend_weakrefs.stub.php @@ -0,0 +1,9 @@ +