root/CRB_dev.h
/* [<][>][^][v][top][bottom][index][help] */
DEFINITIONS
This source file includes following definitions.
- CRB_FALSE
- CRB_TRUE
- CRB_Boolean
- CRB_BOOLEAN_VALUE
- CRB_INT_VALUE
- CRB_DOUBLE_VALUE
- CRB_STRING_VALUE
- CRB_NATIVE_POINTER_VALUE
- CRB_NULL_VALUE
- CRB_ARRAY_VALUE
- CRB_ValueType
- CRB_Value
#ifndef PUBLIC_CRB_DEV_H_INCLUDED
#define PUBLIC_CRB_DEV_H_INCLUDED
#define PRIVATE_CROWBAR_H_INCLUDED
typedef enum {
CRB_FALSE = 0,
CRB_TRUE = 1
} CRB_Boolean;
typedef struct CRB_Object_tag CRB_Object;
typedef struct CRB_Array_tag CRB_Array;
typedef struct CRB_String_tag CRB_String;
typedef enum {
CRB_BOOLEAN_VALUE = 1,
CRB_INT_VALUE,
CRB_DOUBLE_VALUE,
CRB_STRING_VALUE,
CRB_NATIVE_POINTER_VALUE,
CRB_NULL_VALUE,
CRB_ARRAY_VALUE
} CRB_ValueType;
typedef struct {
CRB_ValueType type;
union {
CRB_Boolean boolean_value;
int int_value;
double double_value;
void *native_pointer_value;
CRB_Object *object;
} u;
} CRB_Value;
typedef CRB_Value CRB_NativeFunctionProc(CRB_Interpreter *interpreter,
int arg_count, CRB_Value *args);
void CRB_add_native_function(CRB_Interpreter *interpreter,
char *name, CRB_NativeFunctionProc *proc);
void CRB_push_value(CRB_Interpreter *inter, CRB_Value *value);
CRB_Value CRB_pop_value(CRB_Interpreter *inter);
void CRB_shrink_stack(CRB_Interpreter *inter, int shrink_size);
#endif /* PUBLIC_CRB_DEV_H_INCLUDED */