Branch: Tag:

2007-01-05

2007-01-05 15:49:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Don't attempt to encode programs that haven't been fixated.
Fixes fatal "Unknown identifier type.".

Rev: src/encode.c:1.239

2:   || 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: encode.c,v 1.238 2006/10/27 18:43:15 grubba Exp $ + || $Id: encode.c,v 1.239 2007/01/05 15:49:47 grubba Exp $   */      #include "global.h"
975:    }    if (data->canonic)    Pike_error("Canonical encoding of programs not supported.\n"); +  if (!(val->u.program->flags & PROGRAM_FIXED)) +  Pike_error("Encoding of unfixated programs not supported.\n");    check_stack(1);    push_svalue(val);    apply(data->codec,"nameof", 1);
1518:       default:;   #ifdef PIKE_DEBUG -  Pike_fatal ("Unknown identifier type.\n"); +  Pike_fatal ("Unknown identifier type: 0x%04x for symbol \"%s\".\n", +  id->identifier_flags & IDENTIFIER_TYPE_MASK, +  id->name->str);   #endif    }    }