Branch: Tag:

2001-12-14

2001-12-14 10:04:10 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fix for [bug 2504 (#2504)].

Rev: src/program.c:1.308

5:   \*/   /**/   #include "global.h" - RCSID("$Id: program.c,v 1.307 2001/10/02 09:10:44 hubbe Exp $"); + RCSID("$Id: program.c,v 1.308 2001/12/14 10:04:10 grubba Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
4563:      PMOD_EXPORT void change_compiler_compatibility(int major, int minor)   { +  if(major == PIKE_MAJOR_VERSION && minor == PIKE_MINOR_VERSION) +  { +  push_int(0); /* optimization */ +  } else {    if(major == Pike_compiler->compat_major &&    minor == Pike_compiler->compat_minor) { -  +  /* Optimization -- reuse the current compat handler. */    if (compat_handler) { -  add_ref(compat_handler); +  ref_push_object(compat_handler); +  } else { +  push_int(0);    } -  return; -  } -  -  if(major == PIKE_MAJOR_VERSION && minor == PIKE_MINOR_VERSION) -  { -  push_int(0); /* optimization */ -  }else{ +  } else {    push_int(major);    push_int(minor);    SAFE_APPLY_MASTER("get_compilation_handler",2);    } -  +  }       if(compat_handler)    {