Branch: Tag:

1999-12-13

1999-12-13 12:08:13 by Martin Stjernholm <mast@lysator.liu.se>

Added "dynamic type" macros to easily specify types from C that have e.g.
objects with inherit/implement info or integers with arbitrary ranges.

Rev: src/constants.h:1.11
Rev: src/pike_types.c:1.92
Rev: src/pike_types.h:1.29
Rev: src/program.h:1.69

5:   \*/      /* -  * $Id: constants.h,v 1.10 1999/12/07 09:40:55 hubbe Exp $ +  * $Id: constants.h,v 1.11 1999/12/13 12:08:12 mast Exp $    */   #ifndef ADD_EFUN_H   #define ADD_EFUN_H
78:      #define ADD_EFUN2(NAME,FUN,TYPE,FLAGS,OPTIMIZE,DOCODE) \    quick_add_efun(NAME,CONSTANT_STRLEN(NAME),FUN,TYPE,CONSTANT_STRLEN(TYPE),FLAGS,OPTIMIZE,DOCODE) +  + #define ADD_EFUN_DTYPE(NAME,FUN,DTYPE,FLAGS) do { \ +  DTYPE_START; \ +  {DTYPE} \ +  { \ +  struct pike_string *_t; \ +  DTYPE_END(_t); \ +  quick_add_efun(NAME,CONSTANT_STRLEN(NAME),FUN,_t->str,_t->len,FLAGS,0,0); \ +  free_string(_t); \ +  } \ + } while (0) +    #endif