mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Added arginfo stubs for sysvmsg
Closes GH-4522.
This commit is contained in:
parent
7c49951769
commit
9f95d68ca3
@ -24,6 +24,7 @@
|
||||
#include "php_globals.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_sysvmsg.h"
|
||||
#include "sysvmsg_arginfo.h"
|
||||
#include "ext/standard/php_var.h"
|
||||
#include "zend_smart_str.h"
|
||||
|
||||
@ -62,50 +63,6 @@ struct php_msgbuf {
|
||||
/* True global resources - no need for thread safety here */
|
||||
static int le_sysvmsg;
|
||||
|
||||
/* {{{ arginfo */
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_get_queue, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, key)
|
||||
ZEND_ARG_INFO(0, perms)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_send, 0, 0, 3)
|
||||
ZEND_ARG_INFO(0, queue)
|
||||
ZEND_ARG_INFO(0, msgtype)
|
||||
ZEND_ARG_INFO(0, message)
|
||||
ZEND_ARG_INFO(0, serialize)
|
||||
ZEND_ARG_INFO(0, blocking)
|
||||
ZEND_ARG_INFO(1, errorcode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_receive, 0, 0, 5)
|
||||
ZEND_ARG_INFO(0, queue)
|
||||
ZEND_ARG_INFO(0, desiredmsgtype)
|
||||
ZEND_ARG_INFO(1, msgtype)
|
||||
ZEND_ARG_INFO(0, maxsize)
|
||||
ZEND_ARG_INFO(1, message)
|
||||
ZEND_ARG_INFO(0, unserialize)
|
||||
ZEND_ARG_INFO(0, flags)
|
||||
ZEND_ARG_INFO(1, errorcode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_remove_queue, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, queue)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_stat_queue, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, queue)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_set_queue, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, queue)
|
||||
ZEND_ARG_INFO(0, data)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_queue_exists, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, key)
|
||||
ZEND_END_ARG_INFO()
|
||||
/* }}} */
|
||||
|
||||
/* {{{ sysvmsg_functions[]
|
||||
*
|
||||
* Every user visible function must have an entry in sysvmsg_functions[].
|
||||
|
32
ext/sysvmsg/sysvmsg.stub.php
Normal file
32
ext/sysvmsg/sysvmsg.stub.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/** @return resource|false */
|
||||
function msg_get_queue(int $key, int $perms = 0666) {}
|
||||
|
||||
/**
|
||||
* @param resource $queue
|
||||
*/
|
||||
function msg_send($queue, int $msgtype, $message, bool $serialize = true, bool $blocking = true, &$errorcode = null): bool {}
|
||||
|
||||
/**
|
||||
* @param resource $queue
|
||||
*/
|
||||
function msg_receive($queue, int $desiredmsgtype, &$msgtype, int $maxsize, &$message, bool $unserialize = true, int $flags = 0, &$errorcode = null): bool {}
|
||||
|
||||
/**
|
||||
* @param resource $queue
|
||||
*/
|
||||
function msg_remove_queue($queue): bool {}
|
||||
|
||||
/**
|
||||
* @param resource $queue
|
||||
* @return array|false
|
||||
*/
|
||||
function msg_stat_queue($queue) {}
|
||||
|
||||
/**
|
||||
* @param resource $queue
|
||||
*/
|
||||
function msg_set_queue($queue, array $data): bool {}
|
||||
|
||||
function msg_queue_exists(int $key): bool {}
|
43
ext/sysvmsg/sysvmsg_arginfo.h
Normal file
43
ext/sysvmsg/sysvmsg_arginfo.h
Normal file
@ -0,0 +1,43 @@
|
||||
/* This is a generated file, edit the .stub.php file instead. */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_get_queue, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, perms, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_send, 0, 3, _IS_BOOL, 0)
|
||||
ZEND_ARG_INFO(0, queue)
|
||||
ZEND_ARG_TYPE_INFO(0, msgtype, IS_LONG, 0)
|
||||
ZEND_ARG_INFO(0, message)
|
||||
ZEND_ARG_TYPE_INFO(0, serialize, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, blocking, _IS_BOOL, 0)
|
||||
ZEND_ARG_INFO(1, errorcode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_receive, 0, 5, _IS_BOOL, 0)
|
||||
ZEND_ARG_INFO(0, queue)
|
||||
ZEND_ARG_TYPE_INFO(0, desiredmsgtype, IS_LONG, 0)
|
||||
ZEND_ARG_INFO(1, msgtype)
|
||||
ZEND_ARG_TYPE_INFO(0, maxsize, IS_LONG, 0)
|
||||
ZEND_ARG_INFO(1, message)
|
||||
ZEND_ARG_TYPE_INFO(0, unserialize, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
|
||||
ZEND_ARG_INFO(1, errorcode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_remove_queue, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_ARG_INFO(0, queue)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_stat_queue, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, queue)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_set_queue, 0, 2, _IS_BOOL, 0)
|
||||
ZEND_ARG_INFO(0, queue)
|
||||
ZEND_ARG_TYPE_INFO(0, data, IS_ARRAY, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_queue_exists, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
Loading…
Reference in New Issue
Block a user