summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>1999-12-14 03:48:46 +0000
committerThies C. Arntzen <thies@php.net>1999-12-14 03:48:46 +0000
commitd90daba134dc4bf33326533ba1325c28d35dd651 (patch)
tree7164a06dee826ebea4ecec43a54f3291885d1230
parent8ebba516a314abb61cb8cae7ba54a07877cae3ab (diff)
downloadphp-git-d90daba134dc4bf33326533ba1325c28d35dd651.tar.gz
use _ex-API
-rw-r--r--ext/standard/image.c22
-rw-r--r--ext/standard/info.c20
2 files changed, 23 insertions, 19 deletions
diff --git a/ext/standard/image.c b/ext/standard/image.c
index cdcdf84ada..4749f03ec8 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -296,7 +296,7 @@ static struct gfxinfo *php3_handle_jpeg(FILE *fp,pval *info)
/* main function */
PHP_FUNCTION(getimagesize)
{
- pval *arg1,*info = 0;
+ pval **arg1,**info = 0;
FILE *fp;
int itype = 0;
char filetype[3];
@@ -306,14 +306,14 @@ PHP_FUNCTION(getimagesize)
switch(ARG_COUNT(ht)){
case 1:
- if (getParameters(ht, 1, &arg1) == FAILURE) {
+ if (getParametersEx(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
- convert_to_string(arg1);
+ convert_to_string_ex(arg1);
break;
case 2:
- if (getParameters(ht, 2, &arg1, &info) == FAILURE) {
+ if (getParametersEx(2, &arg1, &info) == FAILURE) {
WRONG_PARAM_COUNT;
}
if (!ParameterPassedByReference(ht, 2)) {
@@ -321,13 +321,13 @@ PHP_FUNCTION(getimagesize)
RETURN_FALSE;
}
- pval_destructor(info);
+ zval_dtor(*info);
- if (array_init(info) == FAILURE) {
+ if (array_init(*info) == FAILURE) {
return;
}
- convert_to_string(arg1);
+ convert_to_string_ex(arg1);
break;
default:
@@ -336,10 +336,10 @@ PHP_FUNCTION(getimagesize)
}
/* Check open_basedir */
- if (_php3_check_open_basedir(arg1->value.str.val)) return;
+ if (_php3_check_open_basedir((*arg1)->value.str.val)) return;
- if ((fp = fopen(arg1->value.str.val,"rb")) == 0) {
- php_error(E_WARNING, "Unable to open %s", arg1->value.str.val);
+ if ((fp = fopen((*arg1)->value.str.val,"rb")) == 0) {
+ php_error(E_WARNING, "Unable to open %s", (*arg1)->value.str.val);
return;
}
fread(filetype,sizeof(filetype),1,fp);
@@ -347,7 +347,7 @@ PHP_FUNCTION(getimagesize)
result = php3_handle_gif (fp);
itype = 1;
} else if (!memcmp(filetype, php3_sig_jpg, 3)) {
- result = php3_handle_jpeg(fp,info);
+ result = php3_handle_jpeg(fp,*info);
itype = 2;
} else if (!memcmp(filetype, php3_sig_png, 3)) {
fseek(fp, 0L, SEEK_SET);
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 141de2f865..9330fff976 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -439,11 +439,12 @@ void register_phpinfo_constants(INIT_FUNC_ARGS)
/* {{{ proto void phpinfo(void)
+
Output a page of useful information about PHP and the current request */
PHP_FUNCTION(phpinfo)
{
int flag;
- zval *flag_arg;
+ zval **flag_arg;
switch (ARG_COUNT(ht)) {
@@ -451,11 +452,11 @@ PHP_FUNCTION(phpinfo)
flag = 0xFFFFFFFF;
break;
case 1:
- if (getParameters(ht, 1, &flag_arg)==FAILURE) {
+ if (getParametersEx(1, &flag_arg)==FAILURE) {
RETURN_FALSE;
}
- convert_to_long(flag_arg);
- flag = flag_arg->value.lval;
+ convert_to_long_ex(flag_arg);
+ flag = (*flag_arg)->value.lval;
break;
default:
WRONG_PARAM_COUNT;
@@ -464,6 +465,7 @@ PHP_FUNCTION(phpinfo)
php_print_info(flag);
RETURN_TRUE;
}
+
/* }}} */
/* {{{ proto string phpversion(void)
@@ -476,11 +478,12 @@ PHP_FUNCTION(phpversion)
/* {{{ proto void phpcredits(int)
+
Prints the list of people who've contributed to the PHP project */
PHP_FUNCTION(phpcredits)
{
int flag;
- zval *flag_arg;
+ zval **flag_arg;
switch (ARG_COUNT(ht)) {
@@ -488,11 +491,11 @@ PHP_FUNCTION(phpcredits)
flag = 0xFFFFFFFF;
break;
case 1:
- if (getParameters(ht, 1, &flag_arg)==FAILURE) {
+ if (getParametersEx(1, &flag_arg)==FAILURE) {
RETURN_FALSE;
}
- convert_to_long(flag_arg);
- flag = flag_arg->value.lval;
+ convert_to_long_ex(flag_arg);
+ flag = (*flag_arg)->value.lval;
break;
default:
WRONG_PARAM_COUNT;
@@ -501,6 +504,7 @@ PHP_FUNCTION(phpcredits)
php_print_credits(flag);
RETURN_TRUE;
}
+
/* }}} */
/*