pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:12668:    }   #endif       return res;   }      /* NOTE: fun_type loses a reference. */   struct pike_type *check_splice_call(struct pike_string *fun_name,    struct pike_type *fun_type,    INT32 argno, -  struct pike_type *arg_type, +  struct pike_type *args_type,    struct svalue *sval,    INT32 flags)   {    struct compilation *c = THIS_COMPILATION;    struct pike_type *tmp = NULL;    struct pike_type *res = NULL;    struct pike_type *prev = fun_type; -  +  struct pike_type *arg_type = index_type(args_type, int_type_string, NULL); +  struct pike_type *ind_type = key_type(args_type, NULL);    int cnt = 256;    /* This argument can expand to anything between zero and MAX_ARGS args. */       copy_pike_type(res, fun_type);       /* Loop until we get a stable fun_type, or it's an invalid argument. */    while ((fun_type = low_new_check_call(debug_malloc_pass(prev),    debug_malloc_pass(arg_type),    flags|CALL_NOT_LAST_ARG, sval)) &&    (fun_type != prev) && --cnt) {
pike.git/src/pike_types.cmod:12728:    /* The splice values are invalid for later arguments. */    if (cnt == 256) {    yywarning("In argument %d to %S: The @-operator argument must be an empty array.",    argno, fun_name);    } else if (c->lex.pragmas & ID_STRICT_TYPES) {    yywarning("In argument %d to %S: The @-operator argument has a max length of %d.",    argno, fun_name, 256-cnt);    }    }    +  free_type(ind_type); +  free_type(arg_type); +     return res;   }      /* NOTE: fun_type loses a reference. */   static struct pike_type *new_check_call_arg(struct pike_string *fun_name,    struct pike_type *fun_type,    node *args, INT32 *argno,    INT32 flags)   {    struct compilation *c = THIS_COMPILATION;