cb22561995-10-11Fredrik Hübinette (Hubbe) /*\
06983f1996-09-22Fredrik Hübinette (Hubbe) ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License)
cb22561995-10-11Fredrik Hübinette (Hubbe) ||| See the files COPYING and DISCLAIMER for more information. \*/
24ddc71998-03-28Henrik Grubbström (Grubba)  /*
45ee5d1999-02-10Fredrik Hübinette (Hubbe)  * $Id: constants.h,v 1.8 1999/02/10 21:46:40 hubbe Exp $
24ddc71998-03-28Henrik Grubbström (Grubba)  */
5267b71995-08-09Fredrik Hübinette (Hubbe) #ifndef ADD_EFUN_H #define ADD_EFUN_H #include "svalue.h" #include "hashtable.h"
cb22561995-10-11Fredrik Hübinette (Hubbe) #include "las.h" /* For OPT_SIDE_EFFECT etc. */
45ee5d1999-02-10Fredrik Hübinette (Hubbe) #include "block_alloc_h.h"
5267b71995-08-09Fredrik Hübinette (Hubbe) 
7bd0ea1996-02-19Fredrik Hübinette (Hubbe) typedef int (*docode_fun)(node *n);
6930181996-02-25Fredrik Hübinette (Hubbe) typedef node *(*optimize_fun)(node *n);
5267b71995-08-09Fredrik Hübinette (Hubbe)  struct callable { INT32 refs;
45ee5d1999-02-10Fredrik Hübinette (Hubbe) #ifdef PIKE_SECURITY struct object *prot; #endif
5267b71995-08-09Fredrik Hübinette (Hubbe)  c_fun function;
06983f1996-09-22Fredrik Hübinette (Hubbe)  struct pike_string *type; struct pike_string *name;
5267b71995-08-09Fredrik Hübinette (Hubbe)  INT16 flags;
7bd0ea1996-02-19Fredrik Hübinette (Hubbe)  optimize_fun optimize; docode_fun docode;
45ee5d1999-02-10Fredrik Hübinette (Hubbe)  struct callable *next;
5267b71995-08-09Fredrik Hübinette (Hubbe) }; /* Prototypes begin here */
be478c1997-08-30Henrik Grubbström (Grubba) struct mapping *get_builtin_constants(void);
06983f1996-09-22Fredrik Hübinette (Hubbe) void low_add_efun(struct pike_string *name, struct svalue *fun);
cecf511997-02-06Fredrik Hübinette (Hubbe) void low_add_constant(char *name, struct svalue *fun); void add_global_program(char *name, struct program *p);
45ee5d1999-02-10Fredrik Hübinette (Hubbe) BLOCK_ALLOC(callable,128) struct callable *low_make_callable(c_fun fun, struct pike_string *name, struct pike_string *type, INT16 flags, optimize_fun optimize, docode_fun docode);
7bd0ea1996-02-19Fredrik Hübinette (Hubbe) struct callable *make_callable(c_fun fun, char *name, char *type, INT16 flags, optimize_fun optimize, docode_fun docode); void add_efun2(char *name, c_fun fun, char *type, INT16 flags, optimize_fun optimize, docode_fun docode);
5267b71995-08-09Fredrik Hübinette (Hubbe) void add_efun(char *name, c_fun fun, char *type, INT16 flags);
45ee5d1999-02-10Fredrik Hübinette (Hubbe) void quick_add_efun(char *name, int name_length, c_fun fun, char *type, int type_length, INT16 flags, optimize_fun optimize, docode_fun docode);
be478c1997-08-30Henrik Grubbström (Grubba) void cleanup_added_efuns(void);
c3c7031996-12-04Fredrik Hübinette (Hubbe) void count_memory_in_callables(INT32 *num_, INT32 *size_);
5267b71995-08-09Fredrik Hübinette (Hubbe) /* Prototypes end here */
5267b71995-08-09Fredrik Hübinette (Hubbe) #endif