php-src/ext/sysvsem/sysvsem_arginfo.h
DanielEScherzer 53cb89670c
Generated arginfo header files: remove empty zend_function_entry arrays (#15705)
When a class (or enum) has no methods, rather than using an array that only
contains `ZEND_FE_END`, use `NULL` for the functions. The implementation of
class registration for internal classes, `do_register_internal_class()` in
zend_API.c, already skips classes where the functions are `NULL`. By removing
these unneeded arrays, we can reduce the size of the header files, while also
removing an unneeded call to zend_register_functions() for each internal class
with no extra methods.
2024-09-03 23:19:53 +02:00

43 lines
1.5 KiB
C
Generated

/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 946ea9d0d2156ced1bac460d7d5fc3420e1934bb */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_sem_get, 0, 1, SysvSemaphore, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_acquire, IS_LONG, 0, "1")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, permissions, IS_LONG, 0, "0666")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, auto_release, _IS_BOOL, 0, "true")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sem_acquire, 0, 1, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, semaphore, SysvSemaphore, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, non_blocking, _IS_BOOL, 0, "false")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sem_release, 0, 1, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, semaphore, SysvSemaphore, 0)
ZEND_END_ARG_INFO()
#define arginfo_sem_remove arginfo_sem_release
ZEND_FUNCTION(sem_get);
ZEND_FUNCTION(sem_acquire);
ZEND_FUNCTION(sem_release);
ZEND_FUNCTION(sem_remove);
static const zend_function_entry ext_functions[] = {
ZEND_FE(sem_get, arginfo_sem_get)
ZEND_FE(sem_acquire, arginfo_sem_acquire)
ZEND_FE(sem_release, arginfo_sem_release)
ZEND_FE(sem_remove, arginfo_sem_remove)
ZEND_FE_END
};
static zend_class_entry *register_class_SysvSemaphore(void)
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "SysvSemaphore", NULL);
class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE);
return class_entry;
}