mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Added shmop arginfo stubs
This commit is contained in:
parent
47b95bd83c
commit
93efcaa9c3
32
ext/shmop/php_shmop.stub.php
Normal file
32
ext/shmop/php_shmop.stub.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/** @return resource|false */
|
||||
function shmop_open(int $key, string $flags, int $mode, int $size) {}
|
||||
|
||||
/**
|
||||
* @param resource $shmid
|
||||
* @return string|false
|
||||
*/
|
||||
function shmop_read($shmid, int $start, int $count) {}
|
||||
|
||||
/**
|
||||
* @param resource $shmid
|
||||
*/
|
||||
function shmop_close($shmid): bool {}
|
||||
|
||||
/**
|
||||
* @param resource $shmid
|
||||
* @return int|false
|
||||
*/
|
||||
function shmop_size($shmid) {}
|
||||
|
||||
/**
|
||||
* @param resource $shmid
|
||||
* @return int|false
|
||||
*/
|
||||
function shmop_write($shmid, string $data, int $offset) {}
|
||||
|
||||
/**
|
||||
* @param resource $shmid
|
||||
*/
|
||||
function shmop_delete($shmid): bool {}
|
30
ext/shmop/php_shmop_arginfo.h
Normal file
30
ext/shmop/php_shmop_arginfo.h
Normal file
@ -0,0 +1,30 @@
|
||||
/* This is a generated file, edit the .stub.php file instead. */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_open, 0, 0, 4)
|
||||
ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, flags, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_read, 0, 0, 3)
|
||||
ZEND_ARG_INFO(0, shmid)
|
||||
ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_shmop_close, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_ARG_INFO(0, shmid)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_size, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, shmid)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_write, 0, 0, 3)
|
||||
ZEND_ARG_INFO(0, shmid)
|
||||
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_shmop_delete arginfo_shmop_close
|
@ -24,6 +24,8 @@
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "php_shmop.h"
|
||||
#include "php_shmop_arginfo.h"
|
||||
|
||||
# ifndef PHP_WIN32
|
||||
# include <sys/ipc.h>
|
||||
# include <sys/shm.h>
|
||||
@ -44,39 +46,6 @@ php_shmop_globals shmop_globals;
|
||||
|
||||
int shm_type;
|
||||
|
||||
/* {{{ arginfo */
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_open, 0, 0, 4)
|
||||
ZEND_ARG_INFO(0, key)
|
||||
ZEND_ARG_INFO(0, flags)
|
||||
ZEND_ARG_INFO(0, mode)
|
||||
ZEND_ARG_INFO(0, size)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_read, 0, 0, 3)
|
||||
ZEND_ARG_INFO(0, shmid)
|
||||
ZEND_ARG_INFO(0, start)
|
||||
ZEND_ARG_INFO(0, count)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_close, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, shmid)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_size, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, shmid)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_write, 0, 0, 3)
|
||||
ZEND_ARG_INFO(0, shmid)
|
||||
ZEND_ARG_INFO(0, data)
|
||||
ZEND_ARG_INFO(0, offset)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_delete, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, shmid)
|
||||
ZEND_END_ARG_INFO()
|
||||
/* }}} */
|
||||
|
||||
/* {{{ shmop_functions[]
|
||||
*/
|
||||
static const zend_function_entry shmop_functions[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user