diff options
author | Seth Alves <alves@src.gnome.org> | 2000-04-19 02:17:07 +0800 |
---|---|---|
committer | Seth Alves <alves@src.gnome.org> | 2000-04-19 02:17:07 +0800 |
commit | 25e1b34aafe43ba6cf1040340a38dd38a90aad33 (patch) | |
tree | 0b4e666e45bf457edcc0095634f0ae6f429b8b5a /libical/scripts/mkderivedparameters.pl | |
parent | bc17057ec598cd5f755fd66244c429ecc51cff01 (diff) | |
download | gsoc2013-evolution-25e1b34aafe43ba6cf1040340a38dd38a90aad33.tar gsoc2013-evolution-25e1b34aafe43ba6cf1040340a38dd38a90aad33.tar.gz gsoc2013-evolution-25e1b34aafe43ba6cf1040340a38dd38a90aad33.tar.bz2 gsoc2013-evolution-25e1b34aafe43ba6cf1040340a38dd38a90aad33.tar.lz gsoc2013-evolution-25e1b34aafe43ba6cf1040340a38dd38a90aad33.tar.xz gsoc2013-evolution-25e1b34aafe43ba6cf1040340a38dd38a90aad33.tar.zst gsoc2013-evolution-25e1b34aafe43ba6cf1040340a38dd38a90aad33.zip |
import of libical-0.16
svn path=/trunk/; revision=2484
Diffstat (limited to 'libical/scripts/mkderivedparameters.pl')
-rwxr-xr-x | libical/scripts/mkderivedparameters.pl | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/libical/scripts/mkderivedparameters.pl b/libical/scripts/mkderivedparameters.pl index d91bab4cb3..2b505c878a 100755 --- a/libical/scripts/mkderivedparameters.pl +++ b/libical/scripts/mkderivedparameters.pl @@ -25,7 +25,11 @@ if ($opt_i) { } - print "/* Everything below this line is machine generated. Do not edit. */\n"; + if($opt_p){ + print "# Everything below this line is machine generated. Do not edit. \n"; + } else { + print "/* Everything below this line is machine generated. Do not edit. */\n"; + } } @@ -114,8 +118,13 @@ while(<F>){ my $set_code; my $pointer_check; my $new_pointer_check; + my $new_pointer_check_v; + my $xrange; - $new_pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");" if $type=~/char/; + if ($type=~/char/){ + $new_pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");"; + $new_pointer_check_v = "icalerror_check_arg_rv( (v!=0),\"v\");"; + } if ($type=~/char/ ) { @@ -177,7 +186,7 @@ $charorenum void icalparameter_set_${lc}(icalparameter* param, ${type} v) { - $new_pointer_check + $new_pointer_check_v icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); @@ -215,8 +224,8 @@ EOM # $param -package ICal::Parameter::${ucf}; -\@ISA=qw(ICal::Parameter); +package Net::ICal::Parameter::${ucf}; +\@ISA=qw(Net::ICal::Parameter); sub new { @@ -226,14 +235,15 @@ sub new bless \$self, \$package; - my \$p = ICal::icalparameter_new(\$ICal::ICAL_${uc}_PARAMETER); - - \$self->[0] = \$p; + my \$p; if (\$value) { - \$self->set(\$value); + \$p = Net::ICal::icalparameter_new_from_string(\$Net::ICal::ICAL_${uc}_PARAMETER,\$value); + } else { + \$p = Net::ICal::icalparameter_new(\$Net::ICal::ICAL_${uc}_PARAMETER); } + \$self->[0] = \$p; return \$self; } @@ -243,19 +253,14 @@ sub get my \$self = shift; my \$impl = \$self->_impl(); - return ICal::icalparameter_as_ical_string(\$impl); + return Net::ICal::icalparameter_as_ical_string(\$impl); } sub set { - - my \$self = shift; - my \$v = shift; - - my \$impl = \$self->_impl(); - - ICal::icalparameter_set_${lc}(\$impl,\$v) unless !\$v; + # This is hard to implement, so I've punted for now. + die "Set is not implemented"; } EOM |