pike.git
/
src
/
pike_types.h
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/pike_types.h:25:
{ INT32 refs; unsigned INT32 hash; struct pike_type *next; unsigned INT32 flags; unsigned INT16 type; struct pike_type *car; struct pike_type *cdr; };
+
enum type_flag {
+
TYPE_FLAG_IS_LEAF = 0,
+
TYPE_FLAG_CAR_IS_TYPE = 1,
+
TYPE_FLAG_CDR_IS_TYPE = 2,
+
TYPE_FLAG_BOTH_ARE_TYPES = 3,
+
};
+
+
/* The definition of a type node type. */
+
struct pike_type_def
+
{
+
/* TYPE_FLAG_* */
+
enum type_flag flags:8;
+
};
+
extern struct pike_type **pike_type_hash; extern size_t pike_type_hash_size; #define CAR_TO_INT(TYPE) ((char *) (TYPE)->car - (char *) 0) #define CDR_TO_INT(TYPE) ((char *) (TYPE)->cdr - (char *) 0) /* * pike_type flags: */ #define PT_FLAG_MARKER_0 0x000001 /* The subtree holds a '0'. */
pike.git/src/pike_types.h:77:
#define CALL_WEAK_VOID 0x0008 /* Allow promotion of void to zero. */ #define CALL_ARG_LVALUE 0x0010 /* Argument is lvalue (sscanf). */ #define CALL_INHIBIT_WARNINGS 0x0020 /* Inhibit warnings. */ #define CALL_INVERTED_TYPES 0x0040 /* The fun and arg are inverted. */ /* * soft_cast() flags */ #define SOFT_WEAKER 0x0001 /* Soft cast to a weaker type. */
+
PMOD_EXPORT void register_pike_type(int type, const struct pike_type_def *def);
+
void debug_free_type(struct pike_type *t); #ifdef DEBUG_MALLOC #define copy_pike_type(D, S) add_ref((struct pike_type *)debug_malloc_pass(D = (S))) #else /* !DEBUG_MALLOC */ #define copy_pike_type(D, S) add_ref(D = (S)) #endif /* DEBUG_MALLOC */ #define CONSTTYPE(X) make_pike_type(X) extern struct pike_type **type_stack; extern struct pike_type ***pike_type_mark_stack;