pike.git / src / las.c

version» Context lines:

pike.git/src/las.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: las.c,v 1.399 2007/12/17 18:03:33 grubba Exp $ + || $Id: las.c,v 1.400 2007/12/26 11:35:52 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"
pike.git/src/las.c:3244:    n->node_info &= ~OPT_TYPE_NOT_FIXED;       switch(n->token)    {    case F_SOFT_CAST:    if (CAR(n) && CAR(n)->type) {   #ifdef NEW_ARG_CHECK    struct pike_type *soft_type = NULL;    if (CDR(n) && (CDR(n)->token == F_CONSTANT) &&    (CDR(n)->u.sval.type == T_TYPE)) { +  struct pike_string *t1; +  struct pike_string *t2;    soft_type = CDR(n)->u.sval.u.type;    if ((n->type = soft_cast(soft_type, CAR(n)->type, 0))) {    /* Success. */    break;    } -  struct pike_string *t1 = describe_type(soft_type); -  struct pike_string *t2 = describe_type(CAR(n)->type); +  t1 = describe_type(soft_type); +  t2 = describe_type(CAR(n)->type);    my_yyerror("Soft cast of %S to %S isn't a valid cast.",    t2, t1);    free_string(t2);    free_string(t1);    } else {    yytype_error("Soft cast with non-type.",    type_type_string,    CDR(n)->type, 0);    }    /* Failure: Fall through to the old code. */