mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Declare ext/sysvmsg constants in stubs (#9125)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
This commit is contained in:
parent
87cf05e8be
commit
4ad7e7251d
4 changed files with 45 additions and 13 deletions
|
@ -27,4 +27,11 @@ extern zend_module_entry sysvmsg_module_entry;
|
|||
|
||||
#endif /* HAVE_SYSVMSG */
|
||||
|
||||
/* In order to detect MSG_EXCEPT use at run time; we have no way
|
||||
* of knowing what the bit definitions are, so we can't just define
|
||||
* our own MSG_EXCEPT value. */
|
||||
#define PHP_MSG_IPC_NOWAIT 1
|
||||
#define PHP_MSG_NOERROR 2
|
||||
#define PHP_MSG_EXCEPT 4
|
||||
|
||||
#endif /* PHP_SYSVMSG_H */
|
||||
|
|
|
@ -44,13 +44,6 @@ struct php_msgbuf {
|
|||
char mtext[1];
|
||||
};
|
||||
|
||||
/* In order to detect MSG_EXCEPT use at run time; we have no way
|
||||
* of knowing what the bit definitions are, so we can't just define
|
||||
* out own MSG_EXCEPT value. */
|
||||
#define PHP_MSG_IPC_NOWAIT 1
|
||||
#define PHP_MSG_NOERROR 2
|
||||
#define PHP_MSG_EXCEPT 4
|
||||
|
||||
/* {{{ sysvmsg_module_entry */
|
||||
zend_module_entry sysvmsg_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
|
@ -117,11 +110,8 @@ PHP_MINIT_FUNCTION(sysvmsg)
|
|||
sysvmsg_queue_object_handlers.clone_obj = NULL;
|
||||
sysvmsg_queue_object_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
REGISTER_LONG_CONSTANT("MSG_IPC_NOWAIT", PHP_MSG_IPC_NOWAIT, CONST_PERSISTENT|CONST_CS);
|
||||
REGISTER_LONG_CONSTANT("MSG_EAGAIN", EAGAIN, CONST_PERSISTENT|CONST_CS);
|
||||
REGISTER_LONG_CONSTANT("MSG_ENOMSG", ENOMSG, CONST_PERSISTENT|CONST_CS);
|
||||
REGISTER_LONG_CONSTANT("MSG_NOERROR", PHP_MSG_NOERROR, CONST_PERSISTENT|CONST_CS);
|
||||
REGISTER_LONG_CONSTANT("MSG_EXCEPT", PHP_MSG_EXCEPT, CONST_PERSISTENT|CONST_CS);
|
||||
register_sysvmsg_symbols(module_number);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -2,6 +2,32 @@
|
|||
|
||||
/** @generate-class-entries */
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue PHP_MSG_IPC_NOWAIT
|
||||
*/
|
||||
const MSG_IPC_NOWAIT = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue EAGAIN
|
||||
*/
|
||||
const MSG_EAGAIN = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue ENOMSG
|
||||
*/
|
||||
const MSG_ENOMSG = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue PHP_MSG_NOERROR
|
||||
*/
|
||||
const MSG_NOERROR = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue PHP_MSG_EXCEPT
|
||||
*/
|
||||
const MSG_EXCEPT = UNKNOWN;
|
||||
|
||||
/**
|
||||
* @strict-properties
|
||||
* @not-serializable
|
||||
|
|
11
ext/sysvmsg/sysvmsg_arginfo.h
generated
11
ext/sysvmsg/sysvmsg_arginfo.h
generated
|
@ -1,5 +1,5 @@
|
|||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 7acab08abf78d75df333fccd6c47266823a92103 */
|
||||
* Stub hash: ed5b1e4e5dda6a65ce336fc4daa975520c354f17 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_msg_get_queue, 0, 1, SysvMessageQueue, MAY_BE_FALSE)
|
||||
ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
|
||||
|
@ -69,6 +69,15 @@ static const zend_function_entry class_SysvMessageQueue_methods[] = {
|
|||
ZEND_FE_END
|
||||
};
|
||||
|
||||
static void register_sysvmsg_symbols(int module_number)
|
||||
{
|
||||
REGISTER_LONG_CONSTANT("MSG_IPC_NOWAIT", PHP_MSG_IPC_NOWAIT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MSG_EAGAIN", EAGAIN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MSG_ENOMSG", ENOMSG, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MSG_NOERROR", PHP_MSG_NOERROR, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MSG_EXCEPT", PHP_MSG_EXCEPT, CONST_CS | CONST_PERSISTENT);
|
||||
}
|
||||
|
||||
static zend_class_entry *register_class_SysvMessageQueue(void)
|
||||
{
|
||||
zend_class_entry ce, *class_entry;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue