diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@users.noreply.github.com> | 2021-03-04 22:45:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-04 22:45:47 +0300 |
commit | 48d18fcedab884820250436e7734bd6d154c7d4f (patch) | |
tree | 47e856843eb24963c52362bc7dd0035d5de8f444 /redis.c | |
parent | f827ea07a5ab63ca3b78b5b59f652fc3462ca710 (diff) | |
parent | 037dbbf93db7db96633b0dd21c995b64af7aa1b9 (diff) |
Merge pull request #1940 from phpredis/issue-1894-copy
[WIP] Issue #1894
Diffstat (limited to 'redis.c')
-rw-r--r-- | redis.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -134,6 +134,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_config, 0, 0, 2) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_copy, 0, 0, 2) + ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, destination) + ZEND_ARG_ARRAY_INFO(0, options, 0) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO_EX(arginfo_flush, 0, 0, 0) ZEND_ARG_INFO(0, async) ZEND_END_ARG_INFO() @@ -283,6 +289,7 @@ static zend_function_entry redis_functions[] = { PHP_ME(Redis, command, arginfo_command, ZEND_ACC_PUBLIC) PHP_ME(Redis, config, arginfo_config, ZEND_ACC_PUBLIC) PHP_ME(Redis, connect, arginfo_connect, ZEND_ACC_PUBLIC) + PHP_ME(Redis, copy, arginfo_copy, ZEND_ACC_PUBLIC) PHP_ME(Redis, dbSize, arginfo_void, ZEND_ACC_PUBLIC) PHP_ME(Redis, debug, arginfo_key, ZEND_ACC_PUBLIC) PHP_ME(Redis, decr, arginfo_key, ZEND_ACC_PUBLIC) @@ -3534,6 +3541,12 @@ PHP_METHOD(Redis, command) { } /* }}} */ +/* {{{ proto array Redis::copy(string $source, string $destination, array $options = null) */ +PHP_METHOD(Redis, copy) { + REDIS_PROCESS_CMD(copy, redis_1_response) +} +/* }}} */ + /* Helper to format any combination of SCAN arguments */ PHP_REDIS_API int redis_build_scan_cmd(char **cmd, REDIS_SCAN_TYPE type, char *key, int key_len, |