Skip to content

Commit 9e93090

Browse files
cmb69nikic
andcommitted
Autogenerate function entries for COMPersistHelper
Co-authored-by: Nikita Popov <[email protected]>
1 parent dc5077c commit 9e93090

File tree

3 files changed

+27
-18
lines changed

3 files changed

+27
-18
lines changed

ext/com_dotnet/com_persist.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ PHP_COM_DOTNET_API IStream *php_com_wrapper_export_stream(php_stream *stream)
276276
return (IStream*)stm;
277277
}
278278

279-
#define CPH_ME(fname, arginfo) PHP_ME(com_persist, fname, arginfo, ZEND_ACC_PUBLIC)
280-
#define CPH_METHOD(fname) static PHP_METHOD(com_persist, fname)
279+
#define CPH_METHOD(fname) PHP_METHOD(COMPersistHelper, fname)
281280

282281
#define CPH_FETCH() php_com_persist_helper *helper = (php_com_persist_helper*)Z_OBJ_P(getThis());
283282

@@ -663,20 +662,6 @@ CPH_METHOD(__construct)
663662
/* }}} */
664663

665664

666-
667-
668-
static const zend_function_entry com_persist_helper_methods[] = {
669-
CPH_ME(__construct, arginfo_class_COMPersistHelper___construct)
670-
CPH_ME(GetCurFileName, arginfo_class_COMPersistHelper_GetCurFileName)
671-
CPH_ME(SaveToFile, arginfo_class_COMPersistHelper_SaveToFile)
672-
CPH_ME(LoadFromFile, arginfo_class_COMPersistHelper_LoadFromFile)
673-
CPH_ME(GetMaxStreamSize, arginfo_class_COMPersistHelper_GetMaxStreamSize)
674-
CPH_ME(InitNew, arginfo_class_COMPersistHelper_InitNew)
675-
CPH_ME(LoadFromStream, arginfo_class_COMPersistHelper_LoadFromStream)
676-
CPH_ME(SaveToStream, arginfo_class_COMPersistHelper_SaveToStream)
677-
PHP_FE_END
678-
};
679-
680665
static void helper_free_storage(zend_object *obj)
681666
{
682667
php_com_persist_helper *object = (php_com_persist_helper*)obj;
@@ -742,7 +727,7 @@ int php_com_persist_minit(INIT_FUNC_ARGS)
742727
helper_handlers.free_obj = helper_free_storage;
743728
helper_handlers.clone_obj = helper_clone;
744729

745-
INIT_CLASS_ENTRY(ce, "COMPersistHelper", com_persist_helper_methods);
730+
INIT_CLASS_ENTRY(ce, "COMPersistHelper", class_COMPersistHelper_methods);
746731
ce.create_object = helper_new;
747732
helper_ce = zend_register_internal_class(&ce);
748733
helper_ce->ce_flags |= ZEND_ACC_FINAL;

ext/com_dotnet/com_persist.stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
/** @generate-function-entries */
34

45
final class COMPersistHelper
56
{

ext/com_dotnet/com_persist_arginfo.h

Lines changed: 24 additions & 1 deletion
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: 69de4fb111796d28e92e16630221e2d02817e742 */
2+
* Stub hash: 47d926b2ba30bb3616f4175664723352fff164e7 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_COMPersistHelper___construct, 0, 0, 1)
55
ZEND_ARG_OBJ_INFO(0, com_object, VARIANT, 1)
@@ -29,3 +29,26 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_COMPersistHelper_LoadFromS
2929
ZEND_END_ARG_INFO()
3030

3131
#define arginfo_class_COMPersistHelper_SaveToStream arginfo_class_COMPersistHelper_LoadFromStream
32+
33+
34+
ZEND_METHOD(COMPersistHelper, __construct);
35+
ZEND_METHOD(COMPersistHelper, GetCurFileName);
36+
ZEND_METHOD(COMPersistHelper, SaveToFile);
37+
ZEND_METHOD(COMPersistHelper, LoadFromFile);
38+
ZEND_METHOD(COMPersistHelper, GetMaxStreamSize);
39+
ZEND_METHOD(COMPersistHelper, InitNew);
40+
ZEND_METHOD(COMPersistHelper, LoadFromStream);
41+
ZEND_METHOD(COMPersistHelper, SaveToStream);
42+
43+
44+
static const zend_function_entry class_COMPersistHelper_methods[] = {
45+
ZEND_ME(COMPersistHelper, __construct, arginfo_class_COMPersistHelper___construct, ZEND_ACC_PUBLIC)
46+
ZEND_ME(COMPersistHelper, GetCurFileName, arginfo_class_COMPersistHelper_GetCurFileName, ZEND_ACC_PUBLIC)
47+
ZEND_ME(COMPersistHelper, SaveToFile, arginfo_class_COMPersistHelper_SaveToFile, ZEND_ACC_PUBLIC)
48+
ZEND_ME(COMPersistHelper, LoadFromFile, arginfo_class_COMPersistHelper_LoadFromFile, ZEND_ACC_PUBLIC)
49+
ZEND_ME(COMPersistHelper, GetMaxStreamSize, arginfo_class_COMPersistHelper_GetMaxStreamSize, ZEND_ACC_PUBLIC)
50+
ZEND_ME(COMPersistHelper, InitNew, arginfo_class_COMPersistHelper_InitNew, ZEND_ACC_PUBLIC)
51+
ZEND_ME(COMPersistHelper, LoadFromStream, arginfo_class_COMPersistHelper_LoadFromStream, ZEND_ACC_PUBLIC)
52+
ZEND_ME(COMPersistHelper, SaveToStream, arginfo_class_COMPersistHelper_SaveToStream, ZEND_ACC_PUBLIC)
53+
ZEND_FE_END
54+
};

0 commit comments

Comments
 (0)