From 03724a70e91c5e8ce13960e7f7cc2dc21b771fef Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Fri, 17 Aug 2001 09:10:49 +0000 Subject: [PATCH] Z_*_P{0,2} macro work. --- ext/standard/uniqid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index 741510264e..797dc44b69 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -38,7 +38,7 @@ #include "php_lcg.h" #include "uniqid.h" -#define MORE_ENTROPY (argc == 2 && (*flags)->value.lval) +#define MORE_ENTROPY (argc == 2 && Z_LVAL_PP(flags)) /* {{{ proto string uniqid(string prefix, [bool more_entropy]) Generate a unique id */ @@ -60,7 +60,7 @@ PHP_FUNCTION(uniqid) } /* Do some bounds checking since we are using a char array. */ - if ((*prefix)->value.str.len > 114) { + if (Z_STRLEN_PP(prefix) > 114) { php_error(E_WARNING, "The prefix to uniqid should not be more than 114 characters."); return; } @@ -77,9 +77,9 @@ PHP_FUNCTION(uniqid) * digits for usecs. */ if (MORE_ENTROPY) { - sprintf(uniqid, "%s%08x%05x%.8f", (*prefix)->value.str.val, sec, usec, php_combined_lcg(TSRMLS_C) * 10); + sprintf(uniqid, "%s%08x%05x%.8f", Z_STRVAL_PP(prefix), sec, usec, php_combined_lcg(TSRMLS_C) * 10); } else { - sprintf(uniqid, "%s%08x%05x", (*prefix)->value.str.val, sec, usec); + sprintf(uniqid, "%s%08x%05x", Z_STRVAL_PP(prefix), sec, usec); } RETURN_STRING(uniqid, 1); -- 2.50.1