diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-10-17 05:41:39 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-10-17 05:41:39 +0800 |
commit | dcfed36441f2a937ee8ae1f604b7d1f0a5bc5719 (patch) | |
tree | f3aa34a5aa32aea1cd9d370ca3bb894dac64123a /libical/scripts/mkderivedvalues.pl | |
parent | 19ebd1a8475274e074a3fad27dcf326a162bc1ff (diff) | |
download | gsoc2013-evolution-dcfed36441f2a937ee8ae1f604b7d1f0a5bc5719.tar.gz gsoc2013-evolution-dcfed36441f2a937ee8ae1f604b7d1f0a5bc5719.tar.zst gsoc2013-evolution-dcfed36441f2a937ee8ae1f604b7d1f0a5bc5719.zip |
Fixes #25153
2002-10-15 Rodrigo Moya <rodrigo@ximian.com>
Fixes #25153
* scripts/mkderivedvalues.pl: changed the _get functions for
string values to return a NULL if arguments are wrong
* src/libical/icalderivedvalue.c.in (icalvalue_get_x): return from
function if pointer checking fails.
svn path=/trunk/; revision=18378
Diffstat (limited to 'libical/scripts/mkderivedvalues.pl')
-rwxr-xr-x | libical/scripts/mkderivedvalues.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libical/scripts/mkderivedvalues.pl b/libical/scripts/mkderivedvalues.pl index e7ede34ae7..5009419eac 100755 --- a/libical/scripts/mkderivedvalues.pl +++ b/libical/scripts/mkderivedvalues.pl @@ -157,8 +157,10 @@ foreach $value (keys %h) { if ($type =~ /char/){ $assign = "icalmemory_strdup(v);\n\n if (impl->data.v_string == 0){\n errno = ENOMEM;\n }\n"; + $check_arg = "icalerror_check_arg_rz( (value!=0),\"value\");"; } else { $assign = "v;"; + $check_arg = "icalerror_check_arg( (value!=0),\"value\");"; } my $union_data; @@ -197,7 +199,7 @@ void icalvalue_set_${lc}(icalvalue* value, $type v) {\ print "\n impl->data.v_$union_data = $assign \n }\n"; print "$type\ icalvalue_get_${lc}(icalvalue* value)\ {\n\ - icalerror_check_arg( (value!=0),\"value\");\ + $check_arg\ icalerror_check_value_type(value, ICAL_${uc}_VALUE);\ return ((struct icalvalue_impl*)value)->data.v_${union_data};\n}\n"; |