*polished structures.
This commit is contained in:
parent
7122605419
commit
696f8af283
144
core/my_basic.c
144
core/my_basic.c
@ -378,7 +378,7 @@ typedef struct _gc_t {
|
|||||||
_ht_node_t* recursive_table;
|
_ht_node_t* recursive_table;
|
||||||
_ht_node_t* collected_table;
|
_ht_node_t* collected_table;
|
||||||
_ht_node_t* valid_table;
|
_ht_node_t* valid_table;
|
||||||
int_t collecting;
|
unsigned char collecting;
|
||||||
} _gc_t;
|
} _gc_t;
|
||||||
|
|
||||||
typedef struct _calculation_operator_info_t {
|
typedef struct _calculation_operator_info_t {
|
||||||
@ -419,8 +419,8 @@ typedef struct _var_t {
|
|||||||
char* name;
|
char* name;
|
||||||
struct _object_t* data;
|
struct _object_t* data;
|
||||||
#ifdef MB_ENABLE_CLASS
|
#ifdef MB_ENABLE_CLASS
|
||||||
bool_t pathing;
|
bool_t pathing : 1;
|
||||||
bool_t isme;
|
bool_t is_me : 1;
|
||||||
#endif /* MB_ENABLE_CLASS */
|
#endif /* MB_ENABLE_CLASS */
|
||||||
} _var_t;
|
} _var_t;
|
||||||
|
|
||||||
@ -461,7 +461,7 @@ typedef struct _list_t {
|
|||||||
typedef struct _list_it_t {
|
typedef struct _list_it_t {
|
||||||
_ref_t weak_ref;
|
_ref_t weak_ref;
|
||||||
_list_t* list;
|
_list_t* list;
|
||||||
bool_t locking;
|
bool_t locking : 1;
|
||||||
union {
|
union {
|
||||||
_ls_node_t* node;
|
_ls_node_t* node;
|
||||||
int_t ranging;
|
int_t ranging;
|
||||||
@ -479,7 +479,7 @@ typedef struct _dict_t {
|
|||||||
typedef struct _dict_it_t {
|
typedef struct _dict_it_t {
|
||||||
_ref_t weak_ref;
|
_ref_t weak_ref;
|
||||||
_dict_t* dict;
|
_dict_t* dict;
|
||||||
bool_t locking;
|
bool_t locking : 1;
|
||||||
unsigned curr_bucket;
|
unsigned curr_bucket;
|
||||||
_ls_node_t* curr_node;
|
_ls_node_t* curr_node;
|
||||||
} _dict_it_t;
|
} _dict_it_t;
|
||||||
@ -571,7 +571,7 @@ typedef struct _routine_t {
|
|||||||
#ifdef MB_ENABLE_CLASS
|
#ifdef MB_ENABLE_CLASS
|
||||||
_class_t* instance;
|
_class_t* instance;
|
||||||
#endif /* MB_ENABLE_CLASS */
|
#endif /* MB_ENABLE_CLASS */
|
||||||
bool_t is_cloned;
|
bool_t is_cloned : 1;
|
||||||
_invokable_e type;
|
_invokable_e type;
|
||||||
} _routine_t;
|
} _routine_t;
|
||||||
|
|
||||||
@ -616,13 +616,13 @@ typedef struct _object_t {
|
|||||||
void* pointer;
|
void* pointer;
|
||||||
_raw_t raw;
|
_raw_t raw;
|
||||||
} data;
|
} data;
|
||||||
bool_t ref;
|
bool_t is_ref : 1;
|
||||||
#ifdef MB_ENABLE_SOURCE_TRACE
|
#ifdef MB_ENABLE_SOURCE_TRACE
|
||||||
int source_pos;
|
int source_pos;
|
||||||
unsigned short source_row;
|
unsigned short source_row;
|
||||||
unsigned short source_col;
|
unsigned short source_col;
|
||||||
#else /* MB_ENABLE_SOURCE_TRACE */
|
#else /* MB_ENABLE_SOURCE_TRACE */
|
||||||
char source_pos;
|
char source_pos : 1;
|
||||||
#endif /* MB_ENABLE_SOURCE_TRACE */
|
#endif /* MB_ENABLE_SOURCE_TRACE */
|
||||||
} _object_t;
|
} _object_t;
|
||||||
|
|
||||||
@ -1446,7 +1446,7 @@ static void _real_to_str(real_t r, char* str, size_t size, size_t afterpoint);
|
|||||||
#ifdef MB_ENABLE_CLASS
|
#ifdef MB_ENABLE_CLASS
|
||||||
# define _IS_CLASS(__o) ((__o) && ((_object_t*)(__o))->type == _DT_CLASS)
|
# define _IS_CLASS(__o) ((__o) && ((_object_t*)(__o))->type == _DT_CLASS)
|
||||||
# define _GET_CLASS(__o) ((!__o) ? 0 : (_IS_CLASS(__o) ? (__o) : (_IS_VAR(__o) && _IS_CLASS((__o)->data.variable->data) ? (__o)->data.variable->data : 0)))
|
# define _GET_CLASS(__o) ((!__o) ? 0 : (_IS_CLASS(__o) ? (__o) : (_IS_VAR(__o) && _IS_CLASS((__o)->data.variable->data) ? (__o)->data.variable->data : 0)))
|
||||||
# define _IS_ME(__v) (!!(__v)->isme)
|
# define _IS_ME(__v) (!!(__v)->is_me)
|
||||||
#else /* MB_ENABLE_CLASS */
|
#else /* MB_ENABLE_CLASS */
|
||||||
# define _IS_ME(__v) false
|
# define _IS_ME(__v) false
|
||||||
#endif /* MB_ENABLE_CLASS */
|
#endif /* MB_ENABLE_CLASS */
|
||||||
@ -1474,17 +1474,17 @@ static void _real_to_str(real_t r, char* str, size_t size, size_t afterpoint);
|
|||||||
#ifdef MB_ENABLE_ARRAY_REF
|
#ifdef MB_ENABLE_ARRAY_REF
|
||||||
# define _REF_ARRAY(__o) \
|
# define _REF_ARRAY(__o) \
|
||||||
case _DT_ARRAY: \
|
case _DT_ARRAY: \
|
||||||
if(!(__o)->ref) \
|
if(!(__o)->is_ref) \
|
||||||
_ref(&(__o)->data.array->ref, (__o)->data.array); \
|
_ref(&(__o)->data.array->ref, (__o)->data.array); \
|
||||||
break;
|
break;
|
||||||
# define _UNREF_ARRAY(__o) \
|
# define _UNREF_ARRAY(__o) \
|
||||||
case _DT_ARRAY: \
|
case _DT_ARRAY: \
|
||||||
if(!(__o)->ref) \
|
if(!(__o)->is_ref) \
|
||||||
_unref(&(__o)->data.array->ref, (__o)->data.array); \
|
_unref(&(__o)->data.array->ref, (__o)->data.array); \
|
||||||
break;
|
break;
|
||||||
# define _ADDGC_ARRAY(__o, __g) \
|
# define _ADDGC_ARRAY(__o, __g) \
|
||||||
case _DT_ARRAY: \
|
case _DT_ARRAY: \
|
||||||
if(!(__o)->ref) \
|
if(!(__o)->is_ref) \
|
||||||
_gc_add(&(__o)->data.array->ref, (__o)->data.array, (__g)); \
|
_gc_add(&(__o)->data.array->ref, (__o)->data.array, (__g)); \
|
||||||
break;
|
break;
|
||||||
#else /* MB_ENABLE_ARRAY_REF */
|
#else /* MB_ENABLE_ARRAY_REF */
|
||||||
@ -1542,12 +1542,12 @@ static void _real_to_str(real_t r, char* str, size_t size, size_t afterpoint);
|
|||||||
break;
|
break;
|
||||||
# define _UNREF_CLASS(__o) \
|
# define _UNREF_CLASS(__o) \
|
||||||
case _DT_CLASS: \
|
case _DT_CLASS: \
|
||||||
if(!(__o)->ref) \
|
if(!(__o)->is_ref) \
|
||||||
_unref(&(__o)->data.instance->ref, (__o)->data.instance); \
|
_unref(&(__o)->data.instance->ref, (__o)->data.instance); \
|
||||||
break;
|
break;
|
||||||
# define _ADDGC_CLASS(__o, __g) \
|
# define _ADDGC_CLASS(__o, __g) \
|
||||||
case _DT_CLASS: \
|
case _DT_CLASS: \
|
||||||
if(!(__o)->ref) \
|
if(!(__o)->is_ref) \
|
||||||
_gc_add(&(__o)->data.instance->ref, (__o)->data.instance, (__g)); \
|
_gc_add(&(__o)->data.instance->ref, (__o)->data.instance, (__g)); \
|
||||||
break;
|
break;
|
||||||
#else /* MB_ENABLE_CLASS */
|
#else /* MB_ENABLE_CLASS */
|
||||||
@ -1562,16 +1562,16 @@ static void _real_to_str(real_t r, char* str, size_t size, size_t afterpoint);
|
|||||||
break;
|
break;
|
||||||
# define _UNREF_ROUTINE(__o) \
|
# define _UNREF_ROUTINE(__o) \
|
||||||
case _DT_ROUTINE: \
|
case _DT_ROUTINE: \
|
||||||
if(!(__o)->ref && (__o)->data.routine->type == _IT_LAMBDA) \
|
if(!(__o)->is_ref && (__o)->data.routine->type == _IT_LAMBDA) \
|
||||||
_unref(&(__o)->data.routine->func.lambda.ref, (__o)->data.routine); \
|
_unref(&(__o)->data.routine->func.lambda.ref, (__o)->data.routine); \
|
||||||
else if(!(__o)->ref && (__o)->data.routine->type != _IT_LAMBDA) \
|
else if(!(__o)->is_ref && (__o)->data.routine->type != _IT_LAMBDA) \
|
||||||
_destroy_routine(0, (__o)->data.routine); \
|
_destroy_routine(0, (__o)->data.routine); \
|
||||||
break;
|
break;
|
||||||
# define _ADDGC_ROUTINE(__o, __g) \
|
# define _ADDGC_ROUTINE(__o, __g) \
|
||||||
case _DT_ROUTINE: \
|
case _DT_ROUTINE: \
|
||||||
if(!(__o)->ref && (__o)->data.routine->type == _IT_LAMBDA) \
|
if(!(__o)->is_ref && (__o)->data.routine->type == _IT_LAMBDA) \
|
||||||
_gc_add(&(__o)->data.routine->func.lambda.ref, (__o)->data.routine, (__g)); \
|
_gc_add(&(__o)->data.routine->func.lambda.ref, (__o)->data.routine, (__g)); \
|
||||||
else if(!(__o)->ref && (__o)->data.routine->type != _IT_LAMBDA) \
|
else if(!(__o)->is_ref && (__o)->data.routine->type != _IT_LAMBDA) \
|
||||||
_dispose_object(__o); \
|
_dispose_object(__o); \
|
||||||
break;
|
break;
|
||||||
#else /* MB_ENABLE_LAMBDA */
|
#else /* MB_ENABLE_LAMBDA */
|
||||||
@ -3618,7 +3618,7 @@ static int _calc_expression(mb_interpreter_t* s, _ls_node_t** l, _object_t** val
|
|||||||
|
|
||||||
(*val)->type = _DT_STRING;
|
(*val)->type = _DT_STRING;
|
||||||
(*val)->data.string = c->data.string;
|
(*val)->data.string = c->data.string;
|
||||||
(*val)->ref = true;
|
(*val)->is_ref = true;
|
||||||
ast = ast->next;
|
ast = ast->next;
|
||||||
|
|
||||||
goto _exit;
|
goto _exit;
|
||||||
@ -3693,7 +3693,7 @@ _array:
|
|||||||
arr_elem = _create_object();
|
arr_elem = _create_object();
|
||||||
_ls_pushback(garbage, arr_elem);
|
_ls_pushback(garbage, arr_elem);
|
||||||
arr_elem->type = arr_type;
|
arr_elem->type = arr_type;
|
||||||
arr_elem->ref = true;
|
arr_elem->is_ref = true;
|
||||||
_COPY_BYTES(arr_elem->data.bytes, arr_val.bytes);
|
_COPY_BYTES(arr_elem->data.bytes, arr_val.bytes);
|
||||||
if(f) {
|
if(f) {
|
||||||
_handle_error_on_obj(s, SE_RN_OPERATOR_EXPECTED, s->source_file, DON(ast), MB_FUNC_ERR, _error, result);
|
_handle_error_on_obj(s, SE_RN_OPERATOR_EXPECTED, s->source_file, DON(ast), MB_FUNC_ERR, _error, result);
|
||||||
@ -3730,7 +3730,7 @@ _array:
|
|||||||
_ls_pushback(garbage, c);
|
_ls_pushback(garbage, c);
|
||||||
result = _public_value_to_internal_object(&running->intermediate_value, c);
|
result = _public_value_to_internal_object(&running->intermediate_value, c);
|
||||||
if(c->type == _DT_STRING)
|
if(c->type == _DT_STRING)
|
||||||
c->ref = true;
|
c->is_ref = true;
|
||||||
if(result != MB_FUNC_OK)
|
if(result != MB_FUNC_OK)
|
||||||
goto _error;
|
goto _error;
|
||||||
if(f) {
|
if(f) {
|
||||||
@ -3811,7 +3811,7 @@ _routine:
|
|||||||
arr_elem = _create_object();
|
arr_elem = _create_object();
|
||||||
_ls_pushback(garbage, arr_elem);
|
_ls_pushback(garbage, arr_elem);
|
||||||
arr_elem->type = arr_type;
|
arr_elem->type = arr_type;
|
||||||
arr_elem->ref = true;
|
arr_elem->is_ref = true;
|
||||||
if(arr_type == _DT_INT) {
|
if(arr_type == _DT_INT) {
|
||||||
arr_elem->data.integer = arr_val.integer;
|
arr_elem->data.integer = arr_val.integer;
|
||||||
} else if(arr_type == _DT_REAL) {
|
} else if(arr_type == _DT_REAL) {
|
||||||
@ -3978,13 +3978,13 @@ _var:
|
|||||||
(*val)->type = c->data.variable->data->type;
|
(*val)->type = c->data.variable->data->type;
|
||||||
(*val)->data = c->data.variable->data->data;
|
(*val)->data = c->data.variable->data->data;
|
||||||
if(_is_string(c))
|
if(_is_string(c))
|
||||||
(*val)->ref = true;
|
(*val)->is_ref = true;
|
||||||
} else {
|
} else {
|
||||||
(*val)->type = c->type;
|
(*val)->type = c->type;
|
||||||
if(_is_string(c)) {
|
if(_is_string(c)) {
|
||||||
char* _str = _extract_string(c);
|
char* _str = _extract_string(c);
|
||||||
(*val)->data.string = mb_strdup(_str, strlen(_str) + 1);
|
(*val)->data.string = mb_strdup(_str, strlen(_str) + 1);
|
||||||
(*val)->ref = false;
|
(*val)->is_ref = false;
|
||||||
} else if(c->type == _DT_ARRAY) {
|
} else if(c->type == _DT_ARRAY) {
|
||||||
(*val)->data = c->data;
|
(*val)->data = c->data;
|
||||||
c->type = _DT_NIL;
|
c->type = _DT_NIL;
|
||||||
@ -4099,17 +4099,17 @@ static int _proc_args(mb_interpreter_t* s, _ls_node_t** l, _running_context_t* r
|
|||||||
var = obj->data.variable;
|
var = obj->data.variable;
|
||||||
|
|
||||||
if(proc_ref)
|
if(proc_ref)
|
||||||
var->data->ref = false;
|
var->data->is_ref = false;
|
||||||
} else {
|
} else {
|
||||||
rnode = _search_identifier_in_scope_chain(s, running, var->name, _PATHING_NONE, 0, 0);
|
rnode = _search_identifier_in_scope_chain(s, running, var->name, _PATHING_NONE, 0, 0);
|
||||||
if(rnode)
|
if(rnode)
|
||||||
var = ((_object_t*)rnode->data)->data.variable;
|
var = ((_object_t*)rnode->data)->data.variable;
|
||||||
|
|
||||||
if(proc_ref)
|
if(proc_ref)
|
||||||
var->data->ref = true;
|
var->data->is_ref = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!pop_arg && var->data->type == _DT_STRING && !var->data->ref)
|
if(!pop_arg && var->data->type == _DT_STRING && !var->data->is_ref)
|
||||||
_mark_lazy_destroy_string(s, var->data->data.string);
|
_mark_lazy_destroy_string(s, var->data->data.string);
|
||||||
result = _public_value_to_internal_object(&arg, var->data);
|
result = _public_value_to_internal_object(&arg, var->data);
|
||||||
|
|
||||||
@ -4885,7 +4885,7 @@ static int _append_symbol(mb_interpreter_t* s, char* sym, bool_t* delsym, int po
|
|||||||
mb_unrefvar(row);
|
mb_unrefvar(row);
|
||||||
mb_unrefvar(col);
|
mb_unrefvar(col);
|
||||||
|
|
||||||
obj->source_pos = (char)pos;
|
obj->source_pos = (char)!!pos;
|
||||||
#endif /* MB_ENABLE_SOURCE_TRACE */
|
#endif /* MB_ENABLE_SOURCE_TRACE */
|
||||||
|
|
||||||
node = _ls_pushback(ast, obj);
|
node = _ls_pushback(ast, obj);
|
||||||
@ -4984,7 +4984,7 @@ static int _create_symbol(mb_interpreter_t* s, _ls_node_t* l, char* sym, _object
|
|||||||
glbsyminscope = _search_identifier_in_scope_chain(s, 0, sym, _PATHING_NONE, 0, 0);
|
glbsyminscope = _search_identifier_in_scope_chain(s, 0, sym, _PATHING_NONE, 0, 0);
|
||||||
if(glbsyminscope && ((_object_t*)glbsyminscope->data)->type == _DT_ARRAY) {
|
if(glbsyminscope && ((_object_t*)glbsyminscope->data)->type == _DT_ARRAY) {
|
||||||
(*obj)->data.array = ((_object_t*)glbsyminscope->data)->data.array;
|
(*obj)->data.array = ((_object_t*)glbsyminscope->data)->data.array;
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
*delsym = true;
|
*delsym = true;
|
||||||
} else {
|
} else {
|
||||||
tmp.array = _create_array(s, sym, _DT_UNKNOWN);
|
tmp.array = _create_array(s, sym, _DT_UNKNOWN);
|
||||||
@ -4997,7 +4997,7 @@ static int _create_symbol(mb_interpreter_t* s, _ls_node_t* l, char* sym, _object
|
|||||||
*obj = _create_object();
|
*obj = _create_object();
|
||||||
(*obj)->type = type;
|
(*obj)->type = type;
|
||||||
(*obj)->data.array = tmp.array;
|
(*obj)->data.array = tmp.array;
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -5006,7 +5006,7 @@ static int _create_symbol(mb_interpreter_t* s, _ls_node_t* l, char* sym, _object
|
|||||||
glbsyminscope = _search_identifier_in_scope_chain(s, 0, sym, _PATHING_NONE, 0, 0);
|
glbsyminscope = _search_identifier_in_scope_chain(s, 0, sym, _PATHING_NONE, 0, 0);
|
||||||
if(glbsyminscope && ((_object_t*)glbsyminscope->data)->type == _DT_CLASS) {
|
if(glbsyminscope && ((_object_t*)glbsyminscope->data)->type == _DT_CLASS) {
|
||||||
(*obj)->data.instance = ((_object_t*)glbsyminscope->data)->data.instance;
|
(*obj)->data.instance = ((_object_t*)glbsyminscope->data)->data.instance;
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
*delsym = true;
|
*delsym = true;
|
||||||
if(running != (*obj)->data.instance->scope &&
|
if(running != (*obj)->data.instance->scope &&
|
||||||
(context->class_state != _CLASS_STATE_NONE) &&
|
(context->class_state != _CLASS_STATE_NONE) &&
|
||||||
@ -5031,7 +5031,7 @@ static int _create_symbol(mb_interpreter_t* s, _ls_node_t* l, char* sym, _object
|
|||||||
*obj = _create_object();
|
*obj = _create_object();
|
||||||
(*obj)->type = type;
|
(*obj)->type = type;
|
||||||
(*obj)->data.instance = tmp.instance;
|
(*obj)->data.instance = tmp.instance;
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -5040,7 +5040,7 @@ static int _create_symbol(mb_interpreter_t* s, _ls_node_t* l, char* sym, _object
|
|||||||
glbsyminscope = _search_identifier_in_scope_chain(s, 0, sym, _PATHING_NONE, 0, 0);
|
glbsyminscope = _search_identifier_in_scope_chain(s, 0, sym, _PATHING_NONE, 0, 0);
|
||||||
if(glbsyminscope && ((_object_t*)glbsyminscope->data)->type == _DT_ROUTINE) {
|
if(glbsyminscope && ((_object_t*)glbsyminscope->data)->type == _DT_ROUTINE) {
|
||||||
(*obj)->data.routine = ((_object_t*)glbsyminscope->data)->data.routine;
|
(*obj)->data.routine = ((_object_t*)glbsyminscope->data)->data.routine;
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
*delsym = true;
|
*delsym = true;
|
||||||
if(running != (*obj)->data.routine->func.basic.scope &&
|
if(running != (*obj)->data.routine->func.basic.scope &&
|
||||||
context->routine_state &&
|
context->routine_state &&
|
||||||
@ -5063,7 +5063,7 @@ static int _create_symbol(mb_interpreter_t* s, _ls_node_t* l, char* sym, _object
|
|||||||
*obj = _create_object();
|
*obj = _create_object();
|
||||||
(*obj)->type = type;
|
(*obj)->type = type;
|
||||||
(*obj)->data.routine = tmp.routine;
|
(*obj)->data.routine = tmp.routine;
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
|
|
||||||
#ifdef MB_ENABLE_CLASS
|
#ifdef MB_ENABLE_CLASS
|
||||||
tmp.routine->instance = s->last_instance;
|
tmp.routine->instance = s->last_instance;
|
||||||
@ -5081,13 +5081,13 @@ static int _create_symbol(mb_interpreter_t* s, _ls_node_t* l, char* sym, _object
|
|||||||
#endif /* MB_ENABLE_CLASS */
|
#endif /* MB_ENABLE_CLASS */
|
||||||
if(!is_field && glbsyminscope && ((_object_t*)glbsyminscope->data)->type == _DT_VAR) {
|
if(!is_field && glbsyminscope && ((_object_t*)glbsyminscope->data)->type == _DT_VAR) {
|
||||||
(*obj)->data.variable = ((_object_t*)glbsyminscope->data)->data.variable;
|
(*obj)->data.variable = ((_object_t*)glbsyminscope->data)->data.variable;
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
*delsym = true;
|
*delsym = true;
|
||||||
} else {
|
} else {
|
||||||
#ifdef MB_ENABLE_CLASS
|
#ifdef MB_ENABLE_CLASS
|
||||||
if(strcmp(sym, _CLASS_ME) == 0) {
|
if(strcmp(sym, _CLASS_ME) == 0) {
|
||||||
_handle_error_now(s, SE_RN_CANNOT_CHANGE_ME, s->source_file, MB_FUNC_ERR);
|
_handle_error_now(s, SE_RN_CANNOT_CHANGE_ME, s->source_file, MB_FUNC_ERR);
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
*delsym = true;
|
*delsym = true;
|
||||||
|
|
||||||
goto _exit;
|
goto _exit;
|
||||||
@ -5113,7 +5113,7 @@ static int _create_symbol(mb_interpreter_t* s, _ls_node_t* l, char* sym, _object
|
|||||||
*obj = _create_object();
|
*obj = _create_object();
|
||||||
(*obj)->type = type;
|
(*obj)->type = type;
|
||||||
(*obj)->data.variable = tmp.var;
|
(*obj)->data.variable = tmp.var;
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -5121,7 +5121,7 @@ static int _create_symbol(mb_interpreter_t* s, _ls_node_t* l, char* sym, _object
|
|||||||
if(context->current_char == ':') {
|
if(context->current_char == ':') {
|
||||||
if(mb_memtest(value, sizeof(_raw_t))) {
|
if(mb_memtest(value, sizeof(_raw_t))) {
|
||||||
memcpy(&((*obj)->data.label), value, sizeof((*obj)->data.label));
|
memcpy(&((*obj)->data.label), value, sizeof((*obj)->data.label));
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
*delsym = true;
|
*delsym = true;
|
||||||
} else {
|
} else {
|
||||||
tmp.label = (_label_t*)mb_malloc(sizeof(_label_t));
|
tmp.label = (_label_t*)mb_malloc(sizeof(_label_t));
|
||||||
@ -5136,7 +5136,7 @@ static int _create_symbol(mb_interpreter_t* s, _ls_node_t* l, char* sym, _object
|
|||||||
*obj = _create_object();
|
*obj = _create_object();
|
||||||
(*obj)->type = type;
|
(*obj)->type = type;
|
||||||
(*obj)->data.label = tmp.label;
|
(*obj)->data.label = tmp.label;
|
||||||
(*obj)->ref = true;
|
(*obj)->is_ref = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
(*obj)->data.label = (_label_t*)mb_malloc(sizeof(_label_t));
|
(*obj)->data.label = (_label_t*)mb_malloc(sizeof(_label_t));
|
||||||
@ -5701,14 +5701,14 @@ static char* _prev_import(mb_interpreter_t* s, char* lf, int* pos, unsigned shor
|
|||||||
|
|
||||||
obj = _create_object();
|
obj = _create_object();
|
||||||
obj->type = _DT_EOS;
|
obj->type = _DT_EOS;
|
||||||
obj->ref = false;
|
obj->is_ref = false;
|
||||||
_ls_pushback(s->ast, obj);
|
_ls_pushback(s->ast, obj);
|
||||||
|
|
||||||
info = (_import_info_t*)mb_malloc(sizeof(_import_info_t));
|
info = (_import_info_t*)mb_malloc(sizeof(_import_info_t));
|
||||||
info->source_file = lf ? mb_strdup(lf, strlen(lf) + 1) : 0;
|
info->source_file = lf ? mb_strdup(lf, strlen(lf) + 1) : 0;
|
||||||
obj = _create_object();
|
obj = _create_object();
|
||||||
obj->type = _DT_PREV_IMPORT;
|
obj->type = _DT_PREV_IMPORT;
|
||||||
obj->ref = false;
|
obj->is_ref = false;
|
||||||
obj->data.import_info = info;
|
obj->data.import_info = info;
|
||||||
_ls_pushback(s->ast, obj);
|
_ls_pushback(s->ast, obj);
|
||||||
|
|
||||||
@ -5748,7 +5748,7 @@ static char* _post_import(mb_interpreter_t* s, char* lf, int* pos, unsigned shor
|
|||||||
info->source_file = lf ? mb_strdup(lf, strlen(lf) + 1) : 0;
|
info->source_file = lf ? mb_strdup(lf, strlen(lf) + 1) : 0;
|
||||||
obj = _create_object();
|
obj = _create_object();
|
||||||
obj->type = _DT_POST_IMPORT;
|
obj->type = _DT_POST_IMPORT;
|
||||||
obj->ref = false;
|
obj->is_ref = false;
|
||||||
obj->data.import_info = info;
|
obj->data.import_info = info;
|
||||||
_ls_pushback(s->ast, obj);
|
_ls_pushback(s->ast, obj);
|
||||||
|
|
||||||
@ -7587,7 +7587,7 @@ static void _init_class(mb_interpreter_t* s, _class_t* instance, char* n) {
|
|||||||
me->data->type = _DT_CLASS;
|
me->data->type = _DT_CLASS;
|
||||||
me->data->data.instance = instance;
|
me->data->data.instance = instance;
|
||||||
me->pathing = true;
|
me->pathing = true;
|
||||||
me->isme = true;
|
me->is_me = true;
|
||||||
_ht_set_or_insert(instance->scope->var_dict, me->name, meobj);
|
_ht_set_or_insert(instance->scope->var_dict, me->name, meobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7769,7 +7769,7 @@ static int _clone_clsss_field(void* data, void* extra, void* n) {
|
|||||||
if(!_ht_find(instance->scope->var_dict, arr->name)) {
|
if(!_ht_find(instance->scope->var_dict, arr->name)) {
|
||||||
ret = _create_object();
|
ret = _create_object();
|
||||||
ret->type = _DT_ARRAY;
|
ret->type = _DT_ARRAY;
|
||||||
ret->ref = false;
|
ret->is_ref = false;
|
||||||
_clone_object(instance->ref.s, obj, ret, false, false);
|
_clone_object(instance->ref.s, obj, ret, false, false);
|
||||||
|
|
||||||
_ht_set_or_insert(instance->scope->var_dict, ret->data.array->name, ret);
|
_ht_set_or_insert(instance->scope->var_dict, ret->data.array->name, ret);
|
||||||
@ -7783,7 +7783,7 @@ static int _clone_clsss_field(void* data, void* extra, void* n) {
|
|||||||
ret = _create_object();
|
ret = _create_object();
|
||||||
ret->type = _DT_ROUTINE;
|
ret->type = _DT_ROUTINE;
|
||||||
ret->data.routine = routine;
|
ret->data.routine = routine;
|
||||||
ret->ref = false;
|
ret->is_ref = false;
|
||||||
|
|
||||||
_ht_set_or_insert(instance->scope->var_dict, obj->data.routine->name, ret);
|
_ht_set_or_insert(instance->scope->var_dict, obj->data.routine->name, ret);
|
||||||
}
|
}
|
||||||
@ -7949,7 +7949,7 @@ static int _format_class_to_string(mb_interpreter_t* s, void** l, _class_t* inst
|
|||||||
_public_value_to_internal_object(&s->running_context->intermediate_value, out);
|
_public_value_to_internal_object(&s->running_context->intermediate_value, out);
|
||||||
if(out->type == _DT_STRING) {
|
if(out->type == _DT_STRING) {
|
||||||
out->data.string = mb_strdup(out->data.string, strlen(out->data.string) + 1);
|
out->data.string = mb_strdup(out->data.string, strlen(out->data.string) + 1);
|
||||||
out->ref = false;
|
out->is_ref = false;
|
||||||
mb_make_nil(s->running_context->intermediate_value);
|
mb_make_nil(s->running_context->intermediate_value);
|
||||||
} else {
|
} else {
|
||||||
_handle_error_on_obj(s, SE_RN_STRING_EXPECTED, s->source_file, DON2(l), MB_FUNC_ERR, _exit, result);
|
_handle_error_on_obj(s, SE_RN_STRING_EXPECTED, s->source_file, DON2(l), MB_FUNC_ERR, _exit, result);
|
||||||
@ -8287,7 +8287,7 @@ static void _try_mark_upvalue(mb_interpreter_t* s, _routine_t* r, _object_t* obj
|
|||||||
inner = (_object_t*)node->data;
|
inner = (_object_t*)node->data;
|
||||||
obj->type = _DT_VAR;
|
obj->type = _DT_VAR;
|
||||||
obj->data = inner->data;
|
obj->data = inner->data;
|
||||||
obj->ref = true;
|
obj->is_ref = true;
|
||||||
} else {
|
} else {
|
||||||
/* Mark upvalues referencing outer scope chain */
|
/* Mark upvalues referencing outer scope chain */
|
||||||
_mark_upvalue(s, lambda, obj, obj->data.variable->name);
|
_mark_upvalue(s, lambda, obj, obj->data.variable->name);
|
||||||
@ -8374,8 +8374,8 @@ static int _fill_with_upvalue(void* data, void* extra, _upvalue_scope_tuple_t* t
|
|||||||
_clone_object(tuple->s, obj, var->data, true, true);
|
_clone_object(tuple->s, obj, var->data, true, true);
|
||||||
_REF(var->data)
|
_REF(var->data)
|
||||||
if(_IS_ROUTINE(obj) && obj->data.routine->type != _IT_LAMBDA) {
|
if(_IS_ROUTINE(obj) && obj->data.routine->type != _IT_LAMBDA) {
|
||||||
ovar->ref = true;
|
ovar->is_ref = true;
|
||||||
var->data->ref = true;
|
var->data->is_ref = true;
|
||||||
}
|
}
|
||||||
#ifdef MB_ENABLE_CLASS
|
#ifdef MB_ENABLE_CLASS
|
||||||
if(obj->type == _DT_VAR)
|
if(obj->type == _DT_VAR)
|
||||||
@ -8395,7 +8395,7 @@ static int _fill_with_upvalue(void* data, void* extra, _upvalue_scope_tuple_t* t
|
|||||||
if(!strcmp(aobj->data.variable->name, ovar->data.variable->name)) {
|
if(!strcmp(aobj->data.variable->name, ovar->data.variable->name)) {
|
||||||
aobj->type = _DT_VAR;
|
aobj->type = _DT_VAR;
|
||||||
aobj->data = ovar->data;
|
aobj->data = ovar->data;
|
||||||
aobj->ref = true;
|
aobj->is_ref = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -8968,7 +8968,7 @@ static _var_t* _create_var(_object_t** oobj, const char* n, size_t ns, bool_t du
|
|||||||
_MAKE_NIL(obj);
|
_MAKE_NIL(obj);
|
||||||
obj->type = _DT_VAR;
|
obj->type = _DT_VAR;
|
||||||
obj->data.variable = var;
|
obj->data.variable = var;
|
||||||
obj->ref = false;
|
obj->is_ref = false;
|
||||||
|
|
||||||
if(oobj) *oobj = obj;
|
if(oobj) *oobj = obj;
|
||||||
|
|
||||||
@ -9124,7 +9124,7 @@ static int _clone_object(mb_interpreter_t* s, _object_t* obj, _object_t* tgt, bo
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tgt->ref = false;
|
tgt->is_ref = false;
|
||||||
#ifdef MB_ENABLE_SOURCE_TRACE
|
#ifdef MB_ENABLE_SOURCE_TRACE
|
||||||
tgt->source_pos = 0;
|
tgt->source_pos = 0;
|
||||||
tgt->source_row = 0;
|
tgt->source_row = 0;
|
||||||
@ -9149,7 +9149,7 @@ static int _dispose_object(_object_t* obj) {
|
|||||||
goto _exit;
|
goto _exit;
|
||||||
switch(obj->type) {
|
switch(obj->type) {
|
||||||
case _DT_VAR:
|
case _DT_VAR:
|
||||||
if(!obj->ref) {
|
if(!obj->is_ref) {
|
||||||
var = (_var_t*)obj->data.variable;
|
var = (_var_t*)obj->data.variable;
|
||||||
safe_free(var->name);
|
safe_free(var->name);
|
||||||
mb_assert(var->data->type != _DT_VAR);
|
mb_assert(var->data->type != _DT_VAR);
|
||||||
@ -9162,7 +9162,7 @@ static int _dispose_object(_object_t* obj) {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case _DT_STRING:
|
case _DT_STRING:
|
||||||
if(!obj->ref) {
|
if(!obj->is_ref) {
|
||||||
if(obj->data.string) {
|
if(obj->data.string) {
|
||||||
safe_free(obj->data.string);
|
safe_free(obj->data.string);
|
||||||
}
|
}
|
||||||
@ -9181,7 +9181,7 @@ static int _dispose_object(_object_t* obj) {
|
|||||||
_UNREF_COLL_IT(obj)
|
_UNREF_COLL_IT(obj)
|
||||||
_UNREF_ROUTINE(obj)
|
_UNREF_ROUTINE(obj)
|
||||||
case _DT_LABEL:
|
case _DT_LABEL:
|
||||||
if(!obj->ref) {
|
if(!obj->is_ref) {
|
||||||
safe_free(obj->data.label->name);
|
safe_free(obj->data.label->name);
|
||||||
safe_free(obj->data.label);
|
safe_free(obj->data.label);
|
||||||
}
|
}
|
||||||
@ -9190,7 +9190,7 @@ static int _dispose_object(_object_t* obj) {
|
|||||||
#ifdef MB_ENABLE_SOURCE_TRACE
|
#ifdef MB_ENABLE_SOURCE_TRACE
|
||||||
case _DT_PREV_IMPORT: /* Fall through */
|
case _DT_PREV_IMPORT: /* Fall through */
|
||||||
case _DT_POST_IMPORT:
|
case _DT_POST_IMPORT:
|
||||||
if(!obj->ref) {
|
if(!obj->is_ref) {
|
||||||
if(obj->data.import_info) {
|
if(obj->data.import_info) {
|
||||||
if(obj->data.import_info->source_file) {
|
if(obj->data.import_info->source_file) {
|
||||||
safe_free(obj->data.import_info->source_file);
|
safe_free(obj->data.import_info->source_file);
|
||||||
@ -9215,7 +9215,7 @@ static int _dispose_object(_object_t* obj) {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
obj->ref = false;
|
obj->is_ref = false;
|
||||||
obj->type = _DT_NIL;
|
obj->type = _DT_NIL;
|
||||||
memset(&obj->data, 0, sizeof(obj->data));
|
memset(&obj->data, 0, sizeof(obj->data));
|
||||||
#ifdef MB_ENABLE_SOURCE_TRACE
|
#ifdef MB_ENABLE_SOURCE_TRACE
|
||||||
@ -9522,7 +9522,7 @@ static int _public_value_to_internal_object(mb_value_t* pbl, _object_t* itn) {
|
|||||||
case MB_DT_STRING:
|
case MB_DT_STRING:
|
||||||
itn->type = _DT_STRING;
|
itn->type = _DT_STRING;
|
||||||
itn->data.string = pbl->value.string;
|
itn->data.string = pbl->value.string;
|
||||||
itn->ref = true;
|
itn->is_ref = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case MB_DT_TYPE:
|
case MB_DT_TYPE:
|
||||||
@ -9545,7 +9545,7 @@ static int _public_value_to_internal_object(mb_value_t* pbl, _object_t* itn) {
|
|||||||
case MB_DT_ARRAY:
|
case MB_DT_ARRAY:
|
||||||
itn->type = _DT_ARRAY;
|
itn->type = _DT_ARRAY;
|
||||||
itn->data.array = (_array_t*)pbl->value.array;
|
itn->data.array = (_array_t*)pbl->value.array;
|
||||||
itn->ref = false;
|
itn->is_ref = false;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#ifdef MB_ENABLE_COLLECTION_LIB
|
#ifdef MB_ENABLE_COLLECTION_LIB
|
||||||
@ -9700,7 +9700,7 @@ static int _create_internal_object_from_public_value(mb_value_t* pbl, _object_t*
|
|||||||
*itn = _create_object();
|
*itn = _create_object();
|
||||||
_public_value_to_internal_object(pbl, *itn);
|
_public_value_to_internal_object(pbl, *itn);
|
||||||
if((*itn)->type == _DT_STRING) {
|
if((*itn)->type == _DT_STRING) {
|
||||||
(*itn)->ref = false;
|
(*itn)->is_ref = false;
|
||||||
(*itn)->data.string = mb_strdup((*itn)->data.string, 0);
|
(*itn)->data.string = mb_strdup((*itn)->data.string, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9779,7 +9779,7 @@ static void _mark_edge_destroy_string(mb_interpreter_t* s, char* ch) {
|
|||||||
|
|
||||||
temp_obj = _create_object();
|
temp_obj = _create_object();
|
||||||
temp_obj->type = _DT_STRING;
|
temp_obj->type = _DT_STRING;
|
||||||
temp_obj->ref = false;
|
temp_obj->is_ref = false;
|
||||||
temp_obj->data.string = ch;
|
temp_obj->data.string = ch;
|
||||||
_ls_pushback(s->edge_destroy_objects, temp_obj);
|
_ls_pushback(s->edge_destroy_objects, temp_obj);
|
||||||
}
|
}
|
||||||
@ -9800,7 +9800,7 @@ static void _mark_lazy_destroy_string(mb_interpreter_t* s, char* ch) {
|
|||||||
|
|
||||||
temp_obj = _create_object();
|
temp_obj = _create_object();
|
||||||
temp_obj->type = _DT_STRING;
|
temp_obj->type = _DT_STRING;
|
||||||
temp_obj->ref = false;
|
temp_obj->is_ref = false;
|
||||||
temp_obj->data.string = ch;
|
temp_obj->data.string = ch;
|
||||||
_ls_pushback(s->lazy_destroy_objects, temp_obj);
|
_ls_pushback(s->lazy_destroy_objects, temp_obj);
|
||||||
}
|
}
|
||||||
@ -9962,7 +9962,7 @@ static _object_t* _eval_var_in_print(mb_interpreter_t* s, _object_t** val_ptr, _
|
|||||||
_public_value_to_internal_object(&s->running_context->intermediate_value, &tmp);
|
_public_value_to_internal_object(&s->running_context->intermediate_value, &tmp);
|
||||||
if(tmp.type == _DT_STRING) {
|
if(tmp.type == _DT_STRING) {
|
||||||
tmp.data.string = mb_strdup(tmp.data.string, strlen(tmp.data.string) + 1);
|
tmp.data.string = mb_strdup(tmp.data.string, strlen(tmp.data.string) + 1);
|
||||||
tmp.ref = false;
|
tmp.is_ref = false;
|
||||||
mb_make_nil(s->running_context->intermediate_value);
|
mb_make_nil(s->running_context->intermediate_value);
|
||||||
}
|
}
|
||||||
**val_ptr = tmp;
|
**val_ptr = tmp;
|
||||||
@ -11536,7 +11536,7 @@ int mb_pop_value(struct mb_interpreter_t* s, void** l, mb_value_t* val) {
|
|||||||
#ifdef MB_ENABLE_USERTYPE_REF
|
#ifdef MB_ENABLE_USERTYPE_REF
|
||||||
_got:
|
_got:
|
||||||
#endif /* MB_ENABLE_USERTYPE_REF */
|
#endif /* MB_ENABLE_USERTYPE_REF */
|
||||||
if(val_ptr->type == _DT_STRING && !val_ptr->ref) {
|
if(val_ptr->type == _DT_STRING && !val_ptr->is_ref) {
|
||||||
_destroy_edge_objects(s);
|
_destroy_edge_objects(s);
|
||||||
_mark_edge_destroy_string(s, val_ptr->data.string);
|
_mark_edge_destroy_string(s, val_ptr->data.string);
|
||||||
}
|
}
|
||||||
@ -12502,7 +12502,7 @@ int mb_set_routine(struct mb_interpreter_t* s, void** l, const char* n, mb_routi
|
|||||||
obj = _create_object();
|
obj = _create_object();
|
||||||
obj->type = _DT_ROUTINE;
|
obj->type = _DT_ROUTINE;
|
||||||
obj->data.routine = routine;
|
obj->data.routine = routine;
|
||||||
obj->ref = false;
|
obj->is_ref = false;
|
||||||
|
|
||||||
#ifdef MB_ENABLE_CLASS
|
#ifdef MB_ENABLE_CLASS
|
||||||
routine->instance = s->last_instance;
|
routine->instance = s->last_instance;
|
||||||
@ -13717,14 +13717,14 @@ _proc_extra_var:
|
|||||||
if(val->type == _DT_ROUTINE) {
|
if(val->type == _DT_ROUTINE) {
|
||||||
#ifdef MB_ENABLE_LAMBDA
|
#ifdef MB_ENABLE_LAMBDA
|
||||||
if(val->data.routine->type == _IT_LAMBDA)
|
if(val->data.routine->type == _IT_LAMBDA)
|
||||||
var->data->ref = val->ref;
|
var->data->is_ref = val->is_ref;
|
||||||
else
|
else
|
||||||
var->data->ref = 1;
|
var->data->is_ref = true;
|
||||||
#else /* MB_ENABLE_LAMBDA */
|
#else /* MB_ENABLE_LAMBDA */
|
||||||
var->data->ref = 1;
|
var->data->is_ref = true;
|
||||||
#endif /* MB_ENABLE_LAMBDA */
|
#endif /* MB_ENABLE_LAMBDA */
|
||||||
} else {
|
} else {
|
||||||
var->data->ref = val->ref;
|
var->data->is_ref = val->is_ref;
|
||||||
}
|
}
|
||||||
#ifdef MB_ENABLE_CLASS
|
#ifdef MB_ENABLE_CLASS
|
||||||
if(evar && evar->pathing) {
|
if(evar && evar->pathing) {
|
||||||
@ -13749,7 +13749,7 @@ _proc_extra_var:
|
|||||||
#else /* MB_ENABLE_COLLECTION_LIB */
|
#else /* MB_ENABLE_COLLECTION_LIB */
|
||||||
arr_obj->data = val->data;
|
arr_obj->data = val->data;
|
||||||
#endif /* MB_ENABLE_COLLECTION_LIB */
|
#endif /* MB_ENABLE_COLLECTION_LIB */
|
||||||
arr_obj->ref = val->ref;
|
arr_obj->is_ref = val->is_ref;
|
||||||
}
|
}
|
||||||
} else if(arr) {
|
} else if(arr) {
|
||||||
mb_value_u _val;
|
mb_value_u _val;
|
||||||
@ -13771,7 +13771,7 @@ _proc_extra_var:
|
|||||||
result = _set_array_elem(s, ast, arr, arr_idx, &_val, &val->type);
|
result = _set_array_elem(s, ast, arr, arr_idx, &_val, &val->type);
|
||||||
if(result != MB_FUNC_OK)
|
if(result != MB_FUNC_OK)
|
||||||
goto _exit;
|
goto _exit;
|
||||||
if(val->type == _DT_STRING && !val->ref) {
|
if(val->type == _DT_STRING && !val->is_ref) {
|
||||||
safe_free(val->data.string);
|
safe_free(val->data.string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -16295,7 +16295,7 @@ _print:
|
|||||||
#endif /* MB_MANUAL_REAL_FORMATTING */
|
#endif /* MB_MANUAL_REAL_FORMATTING */
|
||||||
} else if(val_ptr->type == _DT_STRING) {
|
} else if(val_ptr->type == _DT_STRING) {
|
||||||
_print_string(s, val_ptr);
|
_print_string(s, val_ptr);
|
||||||
if(!val_ptr->ref && val_ptr->data.string && !pathed_str) {
|
if(!val_ptr->is_ref && val_ptr->data.string && !pathed_str) {
|
||||||
safe_free(val_ptr->data.string);
|
safe_free(val_ptr->data.string);
|
||||||
}
|
}
|
||||||
#ifdef MB_ENABLE_USERTYPE_REF
|
#ifdef MB_ENABLE_USERTYPE_REF
|
||||||
|
@ -176,7 +176,7 @@ extern "C" {
|
|||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
# ifndef true
|
# ifndef true
|
||||||
# define true (!0)
|
# define true (1)
|
||||||
# endif /* true */
|
# endif /* true */
|
||||||
# ifndef false
|
# ifndef false
|
||||||
# define false (0)
|
# define false (0)
|
||||||
@ -184,7 +184,7 @@ extern "C" {
|
|||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#ifndef bool_t
|
#ifndef bool_t
|
||||||
# define bool_t char
|
# define bool_t unsigned char
|
||||||
#endif /* bool_t */
|
#endif /* bool_t */
|
||||||
#ifndef int_t
|
#ifndef int_t
|
||||||
# define int_t int
|
# define int_t int
|
||||||
|
@ -49,10 +49,10 @@
|
|||||||
#endif /* MB_CP_CLANG */
|
#endif /* MB_CP_CLANG */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user