pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:5880:    INT32 flags)   {    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, -  INT_ARG_TYPE i, -  INT32 flags) - { -  struct svalue tmp; -  SET_SVAL(tmp, T_INT, NUMBER_NUMBER, integer, i); -  return simple_add_constant(name, &tmp, flags); - } -  +    PMOD_EXPORT int low_add_integer_constant(struct pike_string *name,    INT_ARG_TYPE i,    INT32 flags)   {    struct svalue tmp;    SET_SVAL(tmp, T_INT, NUMBER_NUMBER, integer, i);    return add_constant(name, &tmp, flags);   }      PMOD_EXPORT int quick_add_integer_constant(const char *name,
pike.git/src/program.c:5941:    free_string(id);    return ret;   }      PMOD_EXPORT int add_string_constant(const char *name,    const char *str,    INT32 flags)   {    INT32 ret;    struct svalue tmp; -  SET_SVAL(tmp, T_STRING, 0, string, make_shared_string(str)); -  ret=simple_add_constant(name, &tmp, flags); +  SET_SVAL(tmp, T_STRING, 0, string, make_shared_static_string(str, strlen(str), eightbit)); +  ret=add_constant(make_shared_static_string(name, strlen(name), eightbit), &tmp, flags);    free_svalue(&tmp);    return ret;   }      PMOD_EXPORT int add_program_constant(const char *name,    struct program *p,    INT32 flags)   {    INT32 ret;    struct svalue tmp;