cvs: /php4/ext/standard metaphone.c

From: Date: Tue, 14 Dec 1999 03:50:13 +0000
Subject: cvs: /php4/ext/standard metaphone.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-7894@lists.php.net to get a copy of this message
thies Mon Dec 13 22:50:13 1999 EDT Modified files: /php4/ext/standard metaphone.c Log: use ex-API Index: php4/ext/standard/metaphone.c diff -u php4/ext/standard/metaphone.c:1.1 php4/ext/standard/metaphone.c:1.2 --- php4/ext/standard/metaphone.c:1.1 Mon Sep 13 11:48:32 1999 +++ php4/ext/standard/metaphone.c Mon Dec 13 22:49:42 1999 @@ -47,20 +47,20 @@ /* metaphone -- Breaks english phrases down into their phonemes. */ PHP_FUNCTION(metaphone) { - pval *pstr, *pphones; + pval **pstr, **pphones; char *result = 0; int phones = 0; - if (getParameters(ht, 2, &pstr, &pphones) == SUCCESS) { - convert_to_long(pphones); - phones = pphones->value.lval; - } else if (getParameters(ht, 1, &pstr) == FAILURE) { + if (getParametersEx(2, &pstr, &pphones) == SUCCESS) { + convert_to_long_ex(pphones); + phones = (*pphones)->value.lval; + } else if (getParametersEx(1, &pstr) == FAILURE) { WRONG_PARAM_COUNT; } - convert_to_string(pstr); + convert_to_string_ex(pstr); - if (metaphone(pstr->value.str.val, phones, &result, 1) == 0) { + if (metaphone((*pstr)->value.str.val, phones, &result, 1) == 0) { RETVAL_STRING(result, 0); } else { if (result) {

« previous php.version4 (#7894) next »