com php-src: Remove a number of macros that are no longer used: ext/mcrypt/mcrypt.c

From: Date: Wed, 05 Mar 2014 14:32:32 +0000
Subject: com php-src: Remove a number of macros that are no longer used: ext/mcrypt/mcrypt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76344@lists.php.net to get a copy of this message
Commit: eb0eac75efaf76eb7772c6cd7768a581aeb6de8f Author: Nikita Popov <nikic@php.net> Wed, 5 Mar 2014 15:09:25 +0100 Parents: e5738d3bc9aa2e8110e797ba987891708bc7e72e Branches: PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=eb0eac75efaf76eb7772c6cd7768a581aeb6de8f Log: Remove a number of macros that are no longer used Changed paths: M ext/mcrypt/mcrypt.c Diff: diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 91be96e..ada3fb7 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -310,48 +310,6 @@ zend_module_entry mcrypt_module_entry = { ZEND_GET_MODULE(mcrypt) #endif -#define MCRYPT_ARGS2 \ - zval **cipher, **data, **key, **mode; \ - int td; \ - char *ndata; \ - size_t bsize; \ - size_t nr; \ - size_t nsize - -#define MCRYPT_ARGS \ - MCRYPT_ARGS2; \ - zval **iv - -#define MCRYPT_SIZE \ - bsize = mcrypt_get_block_size(Z_LVAL_PP(cipher)); \ - nr = (Z_STRLEN_PP(data) + bsize - 1) / bsize; \ - nsize = nr * bsize - -#define MCRYPT_CHECK_TD_CPY \ - if (td < 0) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, MCRYPT_FAILED); \ - RETURN_FALSE; \ - } \ - ndata = ecalloc(nr, bsize); \ - memcpy(ndata, Z_STRVAL_PP(data), Z_STRLEN_PP(data)) - -#define MCRYPT_CHECK_IV \ - convert_to_string_ex(iv); \ - if (Z_STRLEN_PP(iv) != bsize) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, MCRYPT_IV_WRONG_SIZE); \ - RETURN_FALSE; \ - } - -#define MCRYPT_ACTION(x) \ - if (Z_LVAL_PP(mode) == 0) { \ - mcrypt_##x(td, ndata, nsize); \ - } else { \ - mdecrypt_##x(td, ndata, nsize); \ - } \ - end_mcrypt_##x(td) - -#define MCRYPT_IV_WRONG_SIZE "The IV parameter must be as long as the blocksize" - #define MCRYPT_ENCRYPT 0 #define MCRYPT_DECRYPT 1

« previous php.cvs (#76344) next »