]> granicus.if.org Git - php/commitdiff
Happy new year (especially to Thies :)
authorZeev Suraski <zeev@php.net>
Fri, 31 Dec 1999 14:06:31 +0000 (14:06 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 31 Dec 1999 14:06:31 +0000 (14:06 +0000)
- Zend branch patches merged in - get the PHP tree uptodate
- Clean

ext/mysql/php_mysql.c
ext/standard/array.c
main/php.h

index c63df6da0f6069a87202912eb87cc131d2d0f1a6..dfe4258545edcb4e3b9fd4e74512e97e11db0a56 100644 (file)
@@ -1255,9 +1255,7 @@ PHP_FUNCTION(mysql_result)
                        return_value->value.str.val = (char *) safe_estrndup(sql_row[field_offset],return_value->value.str.len);
                }
        } else {
-               return_value->value.str.val = undefined_variable_string;
-               return_value->value.str.len=0;
-               return_value->type = IS_STRING;
+               return_value->type = IS_UNSET;
        }
        
        return_value->type = IS_STRING;
index 22bf7e97c8512fff7cfb7b755985aa85051a643e..c13eaeabeed127763e849812175256da33c4e8fa 100644 (file)
@@ -246,7 +246,7 @@ PHP_FUNCTION(count)
        }
        target_hash = HASH_OF(*array);
        if (!target_hash) {
-               if ((*array)->type == IS_STRING && (*array)->value.str.val==undefined_variable_string) {
+               if ((*array)->type == IS_UNSET) {
                        RETURN_LONG(0);
                } else {
                        RETURN_LONG(1);
index 1269bc15692df2e0b47b2654d733a383ddc60ca4..448b705b4ff82ea2e84470955a1680330e2aaaf1 100644 (file)
@@ -253,13 +253,7 @@ extern int ap_vsnprintf(char *, size_t, const char *, va_list);
 #define PHP_MIME_TYPE "application/x-httpd-php"
 
 /* macros */
-#undef MIN
-#undef MAX
 #undef COPY_STRING
-#define DO_OR_DIE(retvalue) if (retvalue==FAILURE) { return FAILURE; }
-#define MAX(a,b)  (((a)>(b))?(a):(b))
-#define MIN(a,b)  (((a)<(b))?(a):(b))
-#define STR_FREE(ptr) if (ptr && ptr!=empty_string && ptr!=undefined_variable_string) { efree(ptr); }
 #define COPY_STRING(yy)   (yy).value.str.val = (char *) estrndup((yy).value.str.val,(yy).value.str.len)
 #define STR_PRINT(str) ((str)?(str):"")