From: Gurusamy Sarathy Date: Tue, 22 Feb 2000 10:01:49 +0000 (+0000) Subject: s/undef/NO_INIT/g in change#5183 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a104f515e1396d6efe6b0936f76a68f8852f5b49;p=p5sagit%2Fp5-mst-13.2.git s/undef/NO_INIT/g in change#5183 p4raw-link: @5183 on //depot/perl: 4628e4f8c013135d9c9ab7023d7730ab67289444 p4raw-id: //depot/perl@5195 --- diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index 4ff0d38..49d167d 100755 --- a/lib/ExtUtils/xsubpp +++ b/lib/ExtUtils/xsubpp @@ -1576,7 +1576,7 @@ sub generate_init { eval qq/print "\\t$var;\\n"/; warn $@ if $@; } - if ($defaults{$var} eq 'undef') { + if ($defaults{$var} eq 'NO_INIT') { $deferred .= eval qq/"\\n\\tif (items >= $num) {\\n$expr;\\n\\t}\\n"/; } else { $deferred .= eval qq/"\\n\\tif (items < $num)\\n\\t $var = $defaults{$var};\\n\\telse {\\n$expr;\\n\\t}\\n"/; diff --git a/pod/perlxs.pod b/pod/perlxs.pod index 2055ce6..7359d34 100644 --- a/pod/perlxs.pod +++ b/pod/perlxs.pod @@ -504,7 +504,7 @@ C. Default values for XSUB arguments can be specified by placing an assignment statement in the parameter list. The default value may -be a number, a string or the special string C. Defaults should +be a number, a string or the special string C. Defaults should always be used on the right-most parameters only. To allow the XSUB for rpcb_gettime() to have a default host @@ -1317,7 +1317,7 @@ methods will be called as this: You could also write a single get/set method using an optional argument: int - color::blue( val = undef ) + color::blue( val = NO_INIT ) int val PROTOTYPE $;$ CODE: