diff options
author | Thies C. Arntzen <thies@php.net> | 1999-12-14 03:48:46 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 1999-12-14 03:48:46 +0000 |
commit | d90daba134dc4bf33326533ba1325c28d35dd651 (patch) | |
tree | 7164a06dee826ebea4ecec43a54f3291885d1230 /ext/standard/image.c | |
parent | 8ebba516a314abb61cb8cae7ba54a07877cae3ab (diff) | |
download | php-git-d90daba134dc4bf33326533ba1325c28d35dd651.tar.gz |
use _ex-API
Diffstat (limited to 'ext/standard/image.c')
-rw-r--r-- | ext/standard/image.c | 22 |
1 files changed, 11 insertions, 11 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); |