pike.git / src / program.c

version» Context lines:

pike.git/src/program.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: program.c,v 1.528 2003/10/20 13:12:18 mast Exp $ + || $Id: program.c,v 1.529 2003/11/07 21:09:50 mast Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.528 2003/10/20 13:12:18 mast Exp $"); + RCSID("$Id: program.c,v 1.529 2003/11/07 21:09:50 mast Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "language.h"   #include "lex.h"   #include "pike_macros.h"   #include "fsort.h"
pike.git/src/program.c:4257:   {    INT32 ret;    struct pike_string *id;    id=make_shared_string(name);    ret=add_constant(id, c, flags);    free_string(id);    return ret;   }      PMOD_EXPORT int add_integer_constant(const char *name, -  INT32 i, +  INT_ARG_TYPE i,    INT32 flags)   {    struct svalue tmp;    tmp.u.integer=i;    tmp.type=T_INT;    tmp.subtype=NUMBER_NUMBER;    return simple_add_constant(name, &tmp, flags);   }      PMOD_EXPORT int quick_add_integer_constant(const char *name,    int name_length, -  INT32 i, +  INT_ARG_TYPE i,    INT32 flags)   {    struct svalue tmp;    struct pike_string *id;    INT32 ret;       tmp.u.integer=i;    tmp.type=T_INT;    tmp.subtype=NUMBER_NUMBER;    id=make_shared_binary_string(name,name_length);    ret=add_constant(id, &tmp, flags);    free_string(id);    return ret;   }      PMOD_EXPORT int add_float_constant(const char *name, -  double f, +  FLOAT_ARG_TYPE f,    INT32 flags)   {    struct svalue tmp;    tmp.type=T_FLOAT; -  tmp.u.float_number = DO_NOT_WARN((FLOAT_TYPE)f); +  tmp.u.float_number = f;    tmp.subtype=0;    return simple_add_constant(name, &tmp, flags);   }    -  + PMOD_EXPORT int quick_add_float_constant(const char *name, +  int name_length, +  FLOAT_ARG_TYPE f, +  INT32 flags) + { +  struct svalue tmp; +  struct pike_string *id; +  INT32 ret; +  +  tmp.u.float_number=f; +  tmp.type=T_FLOAT; +  tmp.subtype=0; +  id=make_shared_binary_string(name,name_length); +  ret=add_constant(id, &tmp, flags); +  free_string(id); +  return ret; + } +    PMOD_EXPORT int add_string_constant(const char *name,    const char *str,    INT32 flags)   {    INT32 ret;    struct svalue tmp;    tmp.type=T_STRING;    tmp.subtype=0;    tmp.u.string=make_shared_string(str);    ret=simple_add_constant(name, &tmp, flags);