summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-28 03:43:52 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-28 03:43:52 +0000
commit954c1994944eafa74aaac1bab94e820b6e447da9 (patch)
treeafa8c853a6e0f521ecc16ce51a98035eb1b6b6f7 /op.h
parent030866aa8d0911636ef2210b710f544fd2c85c8e (diff)
downloadperl-954c1994944eafa74aaac1bab94e820b6e447da9.tar.gz
autogenerate API listing from comments in the source (from Benjamin
Stuhl <sho_pi@hotmail.com>); fix the markup format to be more flexible for better readability; add missing docs in sv.c; regenerate perltoc p4raw-id: //depot/perl@4915
Diffstat (limited to 'op.h')
-rw-r--r--op.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/op.h b/op.h
index 91cdb6b1c9..fc38b9cc6b 100644
--- a/op.h
+++ b/op.h
@@ -52,6 +52,20 @@ typedef U32 PADOFFSET;
((op)->op_flags & OPf_WANT) == OPf_WANT_LIST ? G_ARRAY : \
dfl)
+/*
+=for apidoc Amn|U32|GIMME_V
+The XSUB-writer's equivalent to Perl's C<wantarray>. Returns C<G_VOID>,
+C<G_SCALAR> or C<G_ARRAY> for void, scalar or array context,
+respectively.
+
+=for apidoc Amn|U32|GIMME
+A backward-compatible version of C<GIMME_V> which can only return
+C<G_SCALAR> or C<G_ARRAY>; in a void context, it returns C<G_SCALAR>.
+Deprecated. Use C<GIMME_V> instead.
+
+=cut
+*/
+
#define GIMME_V OP_GIMME(PL_op, block_gimme())
/* Public flags */
@@ -85,6 +99,7 @@ typedef U32 PADOFFSET;
/* old names; don't use in new code, but don't break them, either */
#define OPf_LIST OPf_WANT_LIST
#define OPf_KNOW OPf_WANT
+
#define GIMME \
(PL_op->op_flags & OPf_WANT \
? ((PL_op->op_flags & OPf_WANT) == OPf_WANT_LIST \