summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r--ext/imap/php_imap.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 17456e3df7..53f5007994 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -468,7 +468,7 @@ ZEND_END_ARG_INFO()
/* {{{ imap_functions[]
*/
-const zend_function_entry imap_functions[] = {
+static const zend_function_entry imap_functions[] = {
PHP_FE(imap_open, arginfo_imap_open)
PHP_FE(imap_reopen, arginfo_imap_reopen)
PHP_FE(imap_close, arginfo_imap_close)
@@ -3609,12 +3609,10 @@ PHP_FUNCTION(imap_mail_compose)
topbod = bod;
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "type", sizeof("type") - 1)) != NULL) {
- convert_to_long_ex(pvalue);
- bod->type = (short) Z_LVAL_P(pvalue);
+ bod->type = (short) zval_get_long(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "encoding", sizeof("encoding") - 1)) != NULL) {
- convert_to_long_ex(pvalue);
- bod->encoding = (short) Z_LVAL_P(pvalue);
+ bod->encoding = (short) zval_get_long(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "charset", sizeof("charset") - 1)) != NULL) {
convert_to_string_ex(pvalue);
@@ -3682,12 +3680,10 @@ PHP_FUNCTION(imap_mail_compose)
bod->contents.text.size = 0;
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "lines", sizeof("lines") - 1)) != NULL) {
- convert_to_long_ex(pvalue);
- bod->size.lines = Z_LVAL_P(pvalue);
+ bod->size.lines = zval_get_long(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "bytes", sizeof("bytes") - 1)) != NULL) {
- convert_to_long_ex(pvalue);
- bod->size.bytes = Z_LVAL_P(pvalue);
+ bod->size.bytes = zval_get_long(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "md5", sizeof("md5") - 1)) != NULL) {
convert_to_string_ex(pvalue);
@@ -3696,8 +3692,7 @@ PHP_FUNCTION(imap_mail_compose)
} else if (Z_TYPE_P(data) == IS_ARRAY) {
short type = -1;
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "type", sizeof("type") - 1)) != NULL) {
- convert_to_long_ex(pvalue);
- type = (short) Z_LVAL_P(pvalue);
+ type = (short) zval_get_long(pvalue);
}
if (!toppart) {
@@ -3716,8 +3711,7 @@ PHP_FUNCTION(imap_mail_compose)
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "encoding", sizeof("encoding") - 1)) != NULL) {
- convert_to_long_ex(pvalue);
- bod->encoding = (short) Z_LVAL_P(pvalue);
+ bod->encoding = (short) zval_get_long(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "charset", sizeof("charset") - 1)) != NULL) {
convert_to_string_ex(pvalue);
@@ -3786,12 +3780,10 @@ PHP_FUNCTION(imap_mail_compose)
bod->contents.text.size = 0;
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "lines", sizeof("lines") - 1)) != NULL) {
- convert_to_long_ex(pvalue);
- bod->size.lines = Z_LVAL_P(pvalue);
+ bod->size.lines = zval_get_long(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "bytes", sizeof("bytes") - 1)) != NULL) {
- convert_to_long_ex(pvalue);
- bod->size.bytes = Z_LVAL_P(pvalue);
+ bod->size.bytes = zval_get_long(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "md5", sizeof("md5") - 1)) != NULL) {
convert_to_string_ex(pvalue);