com gtk/php-gtk: Fix null value support for GtkTreePath.: generator/arg_types.php
[email protected] (David Soria Parra) Tue, 07 Feb 2006 07:12:32 +0000
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: aa5ae162dfa829914d530278b99903bd2bd5856c Author: Andrei Zmievski <[email protected]> Tue, 7 Feb 2006 07:12:32 +0000 Parents: 8653d52ac87eef7209c2961330b5696febef3002 Branches: master Link: http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=aa5ae162dfa829914d530278b99903bd2bd5856c Log: Fix null value support for GtkTreePath. Changed paths: M generator/arg_types.php Diff: aa5ae162dfa829914d530278b99903bd2bd5856c diff --git a/generator/arg_types.php b/generator/arg_types.php index 4ea8a8a..620be59 100644 --- a/generator/arg_types.php +++ b/generator/arg_types.php @@ -863,7 +863,7 @@ class GtkTreePath_Arg extends Arg_Type { %(on_error); }\n"; const null_tpl = " - if (Z_TYPE_P(php_%(name)) != IS_NULL) { + if (php_%(name) && Z_TYPE_P(php_%(name)) != IS_NULL) { if (phpg_tree_path_from_zval(php_%(name), &%(name) TSRMLS_CC) == FAILURE) { php_error(E_WARNING, \"%s::%s() expects %(name) to be a valid tree path specification\", get_active_class_name(NULL TSRMLS_CC), get_active_function_name(TSRMLS_C)); %(on_error); @@ -877,7 +877,7 @@ class GtkTreePath_Arg extends Arg_Type { { if ($null_ok) { $info->var_list->add('GtkTreePath', '*' . $name . ' = NULL'); - $info->var_list->add('zval', '*php_' . $name); + $info->var_list->add('zval', '*php_' . $name . ' = NULL'); $info->arg_list[] = $name; $info->add_parse_list('V', '&php_' . $name); $info->pre_code[] = aprintf(self::null_tpl, array('name' => $name,