diff options
-rwxr-xr-x | lib/ExtUtils/xsubpp | 2 | ||||
-rw-r--r-- | pod/perlxs.pod | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index 4ff0d3834c..49d167dc0b 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 2055ce6d39..7359d34818 100644 --- a/pod/perlxs.pod +++ b/pod/perlxs.pod @@ -504,7 +504,7 @@ C<ST(1)>. 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<undef>. Defaults should +be a number, a string or the special string C<NO_INIT>. 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: |