pike.git / src / modules / Perl / perlmod.c

version» Context lines:

pike.git/src/modules/Perl/perlmod.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: perlmod.c,v 1.33 2003/09/05 21:38:12 nilsson Exp $ + || $Id: perlmod.c,v 1.34 2004/01/22 23:14:54 nilsson Exp $   */      #define NO_PIKE_SHORTHAND      #include "builtin_functions.h"   #include "global.h"   #include "svalue.h"   #include "array.h"   #include "stralloc.h"   #include "interpret.h"
pike.git/src/modules/Perl/perlmod.c:624:    fprintf(stderr, "[perlmod_call: args=%d]\n", args);   #endif       if (!ps->perl) Pike_error("No perl interpreter available.\n");       if (args < 1) Pike_error("Too few arguments.\n");    if (args > 201) Pike_error("Too many arguments.\n");       if (Pike_sp[-args].type != PIKE_T_STRING ||    Pike_sp[-args].u.string->size_shift) -  Pike_error("bad Perl function name (must be an 8-bit string)"); +  Pike_error("bad Perl function name (must be an 8-bit string)\n");       ENTER;    SAVETMPS;    PUSHMARK(sp);       for(n = 1; n < args; ++n)    {    struct svalue *s = &(Pike_sp[n-args]);    char *msg;       switch (s->type)    { case PIKE_T_INT:    XPUSHs(sv_2mortal(newSViv(s->u.integer)));    break;    case PIKE_T_FLOAT:    XPUSHs(sv_2mortal(newSVnv((double)(s->u.float_number))));    break;    case PIKE_T_STRING:    if (s->u.string->size_shift)    { PUTBACK; FREETMPS; LEAVE; -  Pike_error("widestrings not supported in Pike-to-Perl call interface"); +  Pike_error("widestrings not supported in Pike-to-Perl call interface\n");    return;    }    XPUSHs(sv_2mortal(newSVpv(s->u.string->str, s->u.string->len)));    break;    case PIKE_T_MAPPING:    msg = "Mapping argument not allowed here.\n"; if (0)    case PIKE_T_OBJECT:    msg = "Object argument not allowed here.\n"; if (0)    case PIKE_T_MULTISET:    msg = "Multiset argument not allowed here.\n"; if (0)
pike.git/src/modules/Perl/perlmod.c:1108:   {    int i;       switch (args)    {    case 0:    break;       case 1:    if (Pike_sp[-args].type != PIKE_T_INT || Pike_sp[-args].u.integer < 1) -  Pike_error("Argument must be a integer in range 1 to 2147483647."); +  Pike_error("Argument must be a integer in range 1 to 2147483647.\n");    _THIS->array_size_limit = Pike_sp[-args].u.integer;    break;       default:    Pike_error("Wrong number of arguments.\n");    }       pop_n_elems(args);    push_int(_THIS->array_size_limit);   }