- Timestamp:
- 05/31/05 03:47:07 (4 years ago)
- svk:copy_cache_prev:
- 5706
- Location:
- src/perl5
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
src/perl5/perl5.c
r4086 r4184 209 209 } 210 210 211 SV * 211 SV ** 212 212 perl5_apply(SV *sub, SV *inv, SV** args, void *env, int cxt) 213 213 { 214 214 SV **arg; 215 SV **out; 215 216 SV *rv; 216 217 SV *sv; … … 243 244 SPAGAIN; 244 245 245 if (count == 1) { 246 rv = newSVsv(POPs); 247 } 248 else { 249 rv = (SV *)newAV(); 250 for (i=0; i<count; ++i) { 251 av_push ((AV *)rv, POPs); 252 } 246 /* fprintf(stderr, "%d is count\n", count); */ 247 Newz(42, out, count+1, SV*); 248 249 for (i=0; i<count; ++i) { 250 out[i] = newSVsv(POPs); 253 251 } 254 252 … … 258 256 259 257 pugs_setenv(old_env); 260 return rv;258 return out; 261 259 } 262 260 -
src/perl5/perl5.h
r3975 r4184 11 11 SV * perl5_newSViv ( int iv ); 12 12 SV * perl5_newSVnv ( double iv ); 13 SV * perl5_apply(SV *sub, SV *inv, SV** args, void *env, int cxt);13 SV ** perl5_apply(SV *sub, SV *inv, SV** args, void *env, int cxt); 14 14 bool perl5_can(SV *inv, char *subname); 15 15 SV * perl5_eval(char *code, void *env, int cxt);
