diff options
| author | Anatol Belski <ab@php.net> | 2014-08-25 19:24:55 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2014-08-25 19:24:55 +0200 |
| commit | c3e3c98ec666812daaaca896cf5ef758a8a6df14 (patch) | |
| tree | d82a76de5c8d117d1cf2dcca19bb30a283621870 /ext/standard/base64.c | |
| parent | 0cf2dbdf58645b52cb6582b1b2571c5cd9e9e6b3 (diff) | |
| download | php-git-c3e3c98ec666812daaaca896cf5ef758a8a6df14.tar.gz | |
master renames phase 1
Diffstat (limited to 'ext/standard/base64.c')
| -rw-r--r-- | ext/standard/base64.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 7ee643a7d5..370e1b2d90 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -63,7 +63,7 @@ PHPAPI zend_string *php_base64_encode(const unsigned char *str, php_size_t lengt return NULL; } - result = STR_ALLOC(((length + 2) / 3) * 4 * sizeof(char), 0); + result = zend_string_alloc(((length + 2) / 3) * 4 * sizeof(char), 0); p = (unsigned char *)result->val; while (length > 2) { /* keep going until we have less than 24 bits */ @@ -144,7 +144,7 @@ PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, php_size_t le /* this sucks for threaded environments */ zend_string *result; - result = STR_ALLOC(length, 0); + result = zend_string_alloc(length, 0); /* run through the whole string, converting as we go */ while ((ch = *current++) != '\0' && length-- > 0) { @@ -158,7 +158,7 @@ PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, php_size_t le continue; } } - STR_FREE(result); + zend_string_free(result); return NULL; } continue; @@ -168,7 +168,7 @@ PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, php_size_t le if ((!strict && ch < 0) || ch == -1) { /* a space or some other separator character, we simply skip over */ continue; } else if (ch == -2) { - STR_FREE(result); + zend_string_free(result); return NULL; } @@ -196,7 +196,7 @@ PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, php_size_t le if (ch == base64_pad) { switch(i % 4) { case 1: - STR_FREE(result); + zend_string_free(result); return NULL; case 2: k++; |
