Hi Andi, last time I checked with 5.1 I was getting sth like resource(%d) of Unknown type .... Which leads me to think that the user may pass the resource to a function and it will greacefully go through zend_parse_parameters() and will fail probably during FETCH_RESOURCE with getting a FALSE back but without any warning. But it is possible that I am wrong.
Andrey
Andi Gutmans wrote:
Andrey,
You should remove ZVAL_NULL(). We don't NULL resource zval if they are deleted. PHP handles that gracefully if mistakenly accessed...
Andi
At 10:23 PM 4/10/2005 +0000, Andrey Hristov wrote:
andrey Sun Apr 10 17:23:28 2005 EDT
Modified files: /php-src/ext/ncurses ncurses_functions.c Log: fix proto. return true instead of null
http://cvs.php.net/diff.php/php-src/ext/ncurses/ncurses_functions.c?r1=1.46&r2=1.47&ty=u
Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.46 php-src/ext/ncurses/ncurses_functions.c:1.47
--- php-src/ext/ncurses/ncurses_functions.c:1.46 Wed Jan 19 21:02:09 2005
+++ php-src/ext/ncurses/ncurses_functions.c Sun Apr 10 17:23:27 2005
@@ -84,7 +84,7 @@
/* }}} */
#endif
-/* {{{ proto int ncurses_delwin(resource window) +/* {{{ proto bool ncurses_delwin(resource window) Deletes a ncurses window */ PHP_FUNCTION(ncurses_delwin) { @@ -98,6 +98,8 @@ FETCH_WINRES(w, &handle);
zend_list_delete(Z_LVAL_P(handle)); + ZVAL_NULL(handle); + RETURN_TRUE; } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php