cvs: pecl /newt newt.c
| From: | Michael Spector | Date: | Tue, 17 Aug 2004 21:10:55 +0000 |
| Subject: | cvs: pecl /newt newt.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-1684@lists.php.net to get a copy of this message | ||
michael Tue Aug 17 17:10:55 2004 EDT
Modified files:
/pecl/newt newt.c
Log:
* fixed bug in returning buttons resources through references passed to newt_button_bar
http://cvs.php.net/diff.php/pecl/newt/newt.c?r1=1.14&r2=1.15&ty=u
Index: pecl/newt/newt.c
diff -u pecl/newt/newt.c:1.14 pecl/newt/newt.c:1.15
--- pecl/newt/newt.c:1.14 Tue Aug 17 16:53:32 2004
+++ pecl/newt/newt.c Tue Aug 17 17:10:54 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: newt.c,v 1.14 2004/08/17 20:53:32 michael Exp $ */
+/* $Id: newt.c,v 1.15 2004/08/17 21:10:54 michael Exp $ */
#include <newt.h>
@@ -3226,9 +3226,12 @@
grid = (newtGrid) newt_vcall ((void *)newtButtonBar, newt_args, argc);
- for (i=0; i<buttons_num; i++) {
+ for (bi=0, i=1; bi<buttons_num; bi++, i+=2) {
if (buttons[i]) {
- ZEND_REGISTER_RESOURCE (NULL, buttons[i], le_newt_comp);
+ if (*(args[i])) {
+ zval_dtor (*(args[i]));
+ }
+ ZEND_REGISTER_RESOURCE (*(args[i]), buttons[i], le_newt_comp);
}
}