summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2013-08-12 13:21:18 +1000
committerTony Cook <tony@develop-help.com>2013-08-12 13:21:18 +1000
commit81968fbb2f582e72bef18261ac12beb27316016a (patch)
tree7dd93427bdbc5c273860c21c0bd437e4b1389af6 /dist
parent14fb7316f01193dcc4968aa60e1cd6c5cef9f51c (diff)
downloadperl-81968fbb2f582e72bef18261ac12beb27316016a.tar.gz
fix several problems in the MY_CXT example in perlxs.pod
- duplicate declaration of name for newMouse - missing OUTPUT clauses - use of a member of the context object that doesn't exist in get_mouse_name() - incorrect type assigned to RETVAL in get_mouse_name - inconsistent indentation - B<> to mark a heading instead of =headN
Diffstat (limited to 'dist')
-rw-r--r--dist/ExtUtils-ParseXS/lib/perlxs.pod25
1 files changed, 14 insertions, 11 deletions
diff --git a/dist/ExtUtils-ParseXS/lib/perlxs.pod b/dist/ExtUtils-ParseXS/lib/perlxs.pod
index 5952c95138..12e2227ef4 100644
--- a/dist/ExtUtils-ParseXS/lib/perlxs.pod
+++ b/dist/ExtUtils-ParseXS/lib/perlxs.pod
@@ -1898,7 +1898,6 @@ Below is an example module that makes use of the macros.
int
newMouse(char * name)
- char * name;
PREINIT:
dMY_CXT;
CODE:
@@ -1910,24 +1909,28 @@ Below is an example module that makes use of the macros.
RETVAL = ++ MY_CXT.count;
strcpy(MY_CXT.name[MY_CXT.count - 1], name);
}
+ OUTPUT:
+ RETVAL
char *
get_mouse_name(index)
- int index
- CODE:
- dMY_CXT;
- RETVAL = MY_CXT.lives ++;
- if (index > MY_CXT.count)
- croak("There are only 3 blind mice.");
- else
- RETVAL = newSVpv(MY_CXT.name[index - 1]);
+ int index
+ PREINIT:
+ dMY_CXT;
+ CODE:
+ if (index > MY_CXT.count)
+ croak("There are only 3 blind mice.");
+ else
+ RETVAL = MY_CXT.name[index - 1];
+ OUTPUT:
+ RETVAL
void
CLONE(...)
CODE:
- MY_CXT_CLONE;
+ MY_CXT_CLONE;
-B<REFERENCE>
+=head3 MY_CXT REFERENCE
=over 5