Branch: Tag:

2003-11-07

2003-11-07 21:09:50 by Martin Stjernholm <mast@lysator.liu.se>

Added ADD_FLOAT_CONSTANT. Fixed types for the functions adding ints and
floats.

Rev: src/program.c:1.529
Rev: src/program.h:1.187

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: program.h,v 1.186 2003/09/04 15:02:02 grubba Exp $ + || $Id: program.h,v 1.187 2003/11/07 21:09:50 mast Exp $   */      #ifndef PROGRAM_H
687:    struct svalue *c,    INT32 flags);   PMOD_EXPORT int add_integer_constant(const char *name, -  INT32 i, +  INT_ARG_TYPE i,    INT32 flags);   PMOD_EXPORT int quick_add_integer_constant(const char *name,    int name_length, -  INT32 i, +  INT_ARG_TYPE i,    INT32 flags);   PMOD_EXPORT int add_float_constant(const char *name, -  double f, +  FLOAT_ARG_TYPE f,    INT32 flags); -  + PMOD_EXPORT int quick_add_float_constant(const char *name, +  int name_length, +  FLOAT_ARG_TYPE f, +  INT32 flags);   PMOD_EXPORT int add_string_constant(const char *name,    const char *str,    INT32 flags);
836:   #define ADD_INT_CONSTANT(NAME, CONST, FLAGS) \    quick_add_integer_constant(NAME, CONSTANT_STRLEN(NAME), CONST, FLAGS)    + #define ADD_FLOAT_CONSTANT(NAME, CONST, FLAGS) \ +  quick_add_float_constant(NAME, CONSTANT_STRLEN(NAME), CONST, FLAGS) +    #define PIKE_MAP_VARIABLE(NAME, OFFSET, TYPE, RTTYPE, FLAGS) \    quick_map_variable(NAME, CONSTANT_STRLEN(NAME), OFFSET, \    TYPE, CONSTANT_STRLEN(TYPE), RTTYPE, FLAGS)