diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/com/COM.c | 2 | ||||
-rw-r--r-- | ext/com/VARIANT.c | 10 | ||||
-rw-r--r-- | ext/com/conversion.c | 4 | ||||
-rw-r--r-- | ext/java/java.c | 2 | ||||
-rw-r--r-- | ext/msql/php_msql.c | 6 | ||||
-rw-r--r-- | ext/mssql/php_mssql.c | 4 | ||||
-rw-r--r-- | ext/oci8/oci8.c | 4 | ||||
-rw-r--r-- | ext/rpc/com/com_wrapper.c | 2 | ||||
-rw-r--r-- | ext/rpc/com/conversion.c | 4 | ||||
-rw-r--r-- | ext/rpc/com/variant.c | 10 | ||||
-rw-r--r-- | ext/rpc/java/java.c | 2 | ||||
-rw-r--r-- | ext/standard/assert.c | 2 | ||||
-rw-r--r-- | ext/standard/url.c | 4 | ||||
-rw-r--r-- | ext/sybase/php_sybase_db.c | 4 | ||||
-rw-r--r-- | ext/sybase_ct/php_sybase_ct.c | 2 | ||||
-rw-r--r-- | ext/xml/xml.c | 5 |
16 files changed, 33 insertions, 34 deletions
diff --git a/ext/com/COM.c b/ext/com/COM.c index 7304f68676..0e8401285e 100644 --- a/ext/com/COM.c +++ b/ext/com/COM.c @@ -1321,7 +1321,7 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro PHP_FN(com_load)(INTERNAL_FUNCTION_PARAM_PASSTHRU); if(!zend_is_true(return_value)) { - ZVAL_BOOL(object, 0); + ZVAL_FALSE(object); return; } ALLOC_ZVAL(object_handle); diff --git a/ext/com/VARIANT.c b/ext/com/VARIANT.c index 681bf4f4d1..49a7335ca0 100644 --- a/ext/com/VARIANT.c +++ b/ext/com/VARIANT.c @@ -161,7 +161,7 @@ void php_VARIANT_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_proper if(!zend_is_true(return_value)) { - ZVAL_BOOL(object, 0); + ZVAL_FALSE(object); return; } @@ -189,7 +189,7 @@ pval php_VARIANT_get_property_handler(zend_property_reference *property_referenc if(!var_arg || (type != IS_VARIANT)) { - ZVAL_BOOL(&result, 0); + ZVAL_FALSE(&result); } else { @@ -197,7 +197,7 @@ pval php_VARIANT_get_property_handler(zend_property_reference *property_referenc switch(overloaded_property->type) { case OE_IS_ARRAY: - ZVAL_BOOL(&result, 0); + ZVAL_FALSE(&result); break; case OE_IS_OBJECT: @@ -211,12 +211,12 @@ pval php_VARIANT_get_property_handler(zend_property_reference *property_referenc } else { - ZVAL_BOOL(&result, 0); + ZVAL_FALSE(&result); php_error(E_WARNING, "Unknown member."); } break; case OE_IS_METHOD: - ZVAL_BOOL(&result, 0); + ZVAL_FALSE(&result); php_error(E_WARNING, "Unknown method."); break; diff --git a/ext/com/conversion.c b/ext/com/conversion.c index 1b523a59b5..3722c31bfd 100644 --- a/ext/com/conversion.c +++ b/ext/com/conversion.c @@ -127,7 +127,7 @@ PHPAPI void php_pval_to_variant(pval *pval_arg, VARIANT *var_arg, int codepage) if(NULL == safeArray) { php_error( E_WARNING,"Unable to convert php array to VARIANT array - %s", numberOfElements ? "" : "(Empty input array)"); - ZVAL_BOOL(pval_arg, 0); + ZVAL_FALSE(pval_arg); } else { @@ -473,7 +473,7 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int persistent, if (1 != (Dims = SafeArrayGetDim(array))) { php_error(E_WARNING,"Unsupported: multi-dimensional (%d) SafeArrays", Dims); - ZVAL_BOOL(pval_arg, 0); + ZVAL_FALSE(pval_arg); return FAILURE; } SafeArrayLock( array); diff --git a/ext/java/java.c b/ext/java/java.c index 08a55c7e72..4a6f746147 100644 --- a/ext/java/java.c +++ b/ext/java/java.c @@ -401,7 +401,7 @@ static int checkError(pval *value) { if (value->type == IS_EXCEPTION) { php_error(E_WARNING, "%s", value->value.str.val); efree(value->value.str.val); - ZVAL_BOOL(value, 0); + ZVAL_FALSE(value); return 1; }; return 0; diff --git a/ext/msql/php_msql.c b/ext/msql/php_msql.c index 15658680bb..c20385e38b 100644 --- a/ext/msql/php_msql.c +++ b/ext/msql/php_msql.c @@ -849,7 +849,7 @@ PHP_FUNCTION(msql_result) return_value->value.str.val = (char *) safe_estrndup(sql_row[field_offset],return_value->value.str.len); } } else { - ZVAL_BOOL(return_value, 0); + ZVAL_FALSE(return_value); } return_value->type = IS_STRING; @@ -1211,7 +1211,7 @@ static void php_msql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type) return_value->value.str.len = 11; return_value->type = IS_STRING; } else { - ZVAL_BOOL(return_value, 0); + ZVAL_FALSE(return_value); } #else if ((msql_field->flags&NOT_NULL_FLAG) && (msql_field->flags&UNIQUE_FLAG)) { @@ -1227,7 +1227,7 @@ static void php_msql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type) return_value->value.str.len = 6; return_value->type = IS_STRING; } else { - ZVAL_BOOL(return_value, 0); + ZVAL_FALSE(return_value); } #endif break; diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 3ac1e3bc05..1e815f0b5d 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -829,7 +829,7 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off result->type = IS_STRING; } else { php_error(E_WARNING,"MS SQL: column %d has unknown data type (%d)", offset, coltype(offset)); - ZVAL_BOOL(result, 0); + ZVAL_FALSE(result); } } } @@ -871,7 +871,7 @@ static void php_mssql_get_column_content_without_type(mssql_link *mssql_ptr,int result->type = IS_STRING; } else { php_error(E_WARNING,"MS SQL: column %d has unknown data type (%d)", offset, coltype(offset)); - ZVAL_BOOL(result, 0); + ZVAL_FALSE(result); } } diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 6c05462f9d..1a81a2ecbb 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -1174,7 +1174,7 @@ _oci_make_zval(zval *value,oci_statement *statement,oci_out_column *column, char } if (oci_loadlob(statement->conn,descr,&buffer,&loblen)) { - ZVAL_BOOL(value,0); + ZVAL_FALSE(value); } else { ZVAL_STRINGL(value,buffer,loblen,0); } @@ -1197,7 +1197,7 @@ _oci_make_zval(zval *value,oci_statement *statement,oci_out_column *column, char default: /* XXX we SHOULD maybe have a different behaviour for unknown results! */ - ZVAL_BOOL(value,0); + ZVAL_FALSE(value); return 0; } diff --git a/ext/rpc/com/com_wrapper.c b/ext/rpc/com/com_wrapper.c index 7304f68676..0e8401285e 100644 --- a/ext/rpc/com/com_wrapper.c +++ b/ext/rpc/com/com_wrapper.c @@ -1321,7 +1321,7 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro PHP_FN(com_load)(INTERNAL_FUNCTION_PARAM_PASSTHRU); if(!zend_is_true(return_value)) { - ZVAL_BOOL(object, 0); + ZVAL_FALSE(object); return; } ALLOC_ZVAL(object_handle); diff --git a/ext/rpc/com/conversion.c b/ext/rpc/com/conversion.c index 1b523a59b5..3722c31bfd 100644 --- a/ext/rpc/com/conversion.c +++ b/ext/rpc/com/conversion.c @@ -127,7 +127,7 @@ PHPAPI void php_pval_to_variant(pval *pval_arg, VARIANT *var_arg, int codepage) if(NULL == safeArray) { php_error( E_WARNING,"Unable to convert php array to VARIANT array - %s", numberOfElements ? "" : "(Empty input array)"); - ZVAL_BOOL(pval_arg, 0); + ZVAL_FALSE(pval_arg); } else { @@ -473,7 +473,7 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int persistent, if (1 != (Dims = SafeArrayGetDim(array))) { php_error(E_WARNING,"Unsupported: multi-dimensional (%d) SafeArrays", Dims); - ZVAL_BOOL(pval_arg, 0); + ZVAL_FALSE(pval_arg); return FAILURE; } SafeArrayLock( array); diff --git a/ext/rpc/com/variant.c b/ext/rpc/com/variant.c index 681bf4f4d1..49a7335ca0 100644 --- a/ext/rpc/com/variant.c +++ b/ext/rpc/com/variant.c @@ -161,7 +161,7 @@ void php_VARIANT_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_proper if(!zend_is_true(return_value)) { - ZVAL_BOOL(object, 0); + ZVAL_FALSE(object); return; } @@ -189,7 +189,7 @@ pval php_VARIANT_get_property_handler(zend_property_reference *property_referenc if(!var_arg || (type != IS_VARIANT)) { - ZVAL_BOOL(&result, 0); + ZVAL_FALSE(&result); } else { @@ -197,7 +197,7 @@ pval php_VARIANT_get_property_handler(zend_property_reference *property_referenc switch(overloaded_property->type) { case OE_IS_ARRAY: - ZVAL_BOOL(&result, 0); + ZVAL_FALSE(&result); break; case OE_IS_OBJECT: @@ -211,12 +211,12 @@ pval php_VARIANT_get_property_handler(zend_property_reference *property_referenc } else { - ZVAL_BOOL(&result, 0); + ZVAL_FALSE(&result); php_error(E_WARNING, "Unknown member."); } break; case OE_IS_METHOD: - ZVAL_BOOL(&result, 0); + ZVAL_FALSE(&result); php_error(E_WARNING, "Unknown method."); break; diff --git a/ext/rpc/java/java.c b/ext/rpc/java/java.c index 08a55c7e72..4a6f746147 100644 --- a/ext/rpc/java/java.c +++ b/ext/rpc/java/java.c @@ -401,7 +401,7 @@ static int checkError(pval *value) { if (value->type == IS_EXCEPTION) { php_error(E_WARNING, "%s", value->value.str.val); efree(value->value.str.val); - ZVAL_BOOL(value, 0); + ZVAL_FALSE(value); return 1; }; return 0; diff --git a/ext/standard/assert.c b/ext/standard/assert.c index 2c44b1f61d..b79e169f71 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -201,7 +201,7 @@ PHP_FUNCTION(assert) ZVAL_STRING(args[2],SAFE_STRING(myeval),1); MAKE_STD_ZVAL(retval); - ZVAL_BOOL(retval,0); + ZVAL_FALSE(retval); /* XXX do we want to check for error here? */ call_user_function(CG(function_table), NULL, ASSERT(callback), retval, 3, args); diff --git a/ext/standard/url.c b/ext/standard/url.c index 8a2db7d998..83bd53b65b 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -295,7 +295,7 @@ PHP_FUNCTION(urlencode) convert_to_string_ex(arg); if (!(*arg)->value.str.len) { - ZVAL_BOOL(return_value, 0); + ZVAL_FALSE(return_value); return; } str = php_url_encode((*arg)->value.str.val, (*arg)->value.str.len, &str_len); @@ -316,7 +316,7 @@ PHP_FUNCTION(urldecode) convert_to_string_ex(arg); if (!(*arg)->value.str.len) { - ZVAL_BOOL(return_value, 0); + ZVAL_FALSE(return_value); return; } diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c index c89c9e9dd7..3a5cd3382f 100644 --- a/ext/sybase/php_sybase_db.c +++ b/ext/sybase/php_sybase_db.c @@ -617,7 +617,7 @@ static void php_sybase_get_column_content(sybase_link *sybase_ptr,int offset,pva *result_ptr = result; if (dbdatlen(sybase_ptr->link,offset) == 0) { - ZVAL_BOOL(result, 0); + ZVAL_FALSE(result); return; } @@ -688,7 +688,7 @@ static void php_sybase_get_column_content(sybase_link *sybase_ptr,int offset,pva result->type = IS_STRING; } else { php_error(E_WARNING,"Sybase: column %d has unknown data type (%d)", offset, coltype(offset)); - ZVAL_BOOL(result, 0); + ZVAL_FALSE(result); } } } diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index b21a100caa..bd7090cf4d 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -991,7 +991,7 @@ static sybase_result * php_sybase_fetch_result_set (sybase_link *sybase_ptr) result->data[i] = (pval *) emalloc(sizeof(pval)*num_fields); for (j=0; j<num_fields; j++) { if (indicators[j] == -1) { /* null value */ - ZVAL_BOOL(&result->data[i][j], 0); + ZVAL_FALSE(&result->data[i][j]); } else { result->data[i][j].value.str.len = lengths[j]-1; /* we don't need the NULL in the length */ result->data[i][j].value.str.val = estrndup(tmp_buffer[j], lengths[j]); diff --git a/ext/xml/xml.c b/ext/xml/xml.c index a722d5b6af..02651950c5 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -271,7 +271,7 @@ static zval *_xml_xmlchar_zval(const XML_Char *s, int len, const XML_Char *encod MAKE_STD_ZVAL(ret); if (s == NULL) { - ZVAL_BOOL(ret, 0); + ZVAL_FALSE(ret); return ret; } if (len == 0) { @@ -375,8 +375,7 @@ xml_call_handler(xml_parser *parser, zval *handler, int argc, zval **argv) int result; MAKE_STD_ZVAL(retval); - retval->type = IS_BOOL; - retval->value.lval = 0; + ZVAL_FALSE(retval); result = call_user_function(EG(function_table), &parser->object, handler, retval, argc, argv); |