cvs: /php4/ext/standard image.c

From: Date: Tue, 14 Dec 1999 03:48:37 +0000
Subject: cvs: /php4/ext/standard image.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-7891@lists.php.net to get a copy of this message
thies Mon Dec 13 22:48:37 1999 EDT Modified files: /php4/ext/standard image.c Log: use _ex-API Index: php4/ext/standard/image.c diff -u php4/ext/standard/image.c:1.6 php4/ext/standard/image.c:1.7 --- php4/ext/standard/image.c:1.6 Thu Sep 2 07:58:23 1999 +++ php4/ext/standard/image.c Mon Dec 13 22:48:06 1999 @@ -15,7 +15,7 @@ | Authors: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ -/* $Id: image.c,v 1.6 1999/09/02 11:58:23 thies Exp $ */ +/* $Id: image.c,v 1.7 1999/12/14 03:48:06 thies Exp $ */ /* * Based on Daniel Schmitt's imageinfo.c which carried the following * Copyright notice. @@ -296,7 +296,7 @@ /* 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 @@ 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 @@ 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 @@ } /* 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 @@ 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);

« previous php.version4 (#7891) next »