root/CRB_dev.h
/* [<][>][^][v][top][bottom][index][help] */
DEFINITIONS
This source file includes following definitions.
- CRB_FALSE
- CRB_TRUE
- CRB_Boolean
- CRB_String
- CRB_BOOLEAN_VALUE
- CRB_INT_VALUE
- CRB_DOUBLE_VALUE
- CRB_STRING_VALUE
- CRB_NATIVE_POINTER_VALUE
- CRB_NULL_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_String_tag {
int ref_count;
char *string;
CRB_Boolean is_literal;
} 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_ValueType;
typedef struct {
CRB_ValueType type;
union {
CRB_Boolean boolean_value;
int int_value;
double double_value;
CRB_String *string_value;
void *native_pointer_value;
} 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);
#endif /* PUBLIC_CRB_DEV_H_INCLUDED */