Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Enable specifing list context to p5 subs (we still support only one r…

…eturn value).
  • Loading branch information...
commit 0ae0fa0e23ec1e6b6edbba65093a33d65b5966ec 1 parent 83e8bea
@pmurias pmurias authored
Showing with 3 additions and 2 deletions.
  1. +2 −2 lib/p5embed.c
  2. +1 −0  t/spectest_p5.data
View
4 lib/p5embed.c
@@ -90,9 +90,9 @@ SV* p5embed_subcall(int context,SV** args,int args_count) {
/* HACK - list context is NYI */
if (context == 1 || context == 0) {
- int count = call_sv(args[0],G_SCALAR);
+ int count = call_sv(args[0],context == 1 ? G_SCALAR : G_ARRAY);
SPAGAIN;
- if (count != 1) croak("Big trouble\n");
+ if (count != 1) croak("We do not support returning multiple return values yet.\n");
SV* ret = POPs;
View
1  t/spectest_p5.data
@@ -1,2 +1,3 @@
S01-perl-5-integration/subs.t
S01-perl-5-integration/strings.t
+S01-perl-5-integration/context.t
Please sign in to comment.
Something went wrong with that request. Please try again.