*polished code.
This commit is contained in:
parent
940a4ba74e
commit
8772a4c3ba
2
HISTORY
2
HISTORY
@ -1,5 +1,5 @@
|
|||||||
Apr. 26 2016
|
Apr. 26 2016
|
||||||
Added an invalid operation usage error when met unexpected expression
|
Added an invalid operation usage error when met an unexpected expression
|
||||||
|
|
||||||
Apr. 22 2016
|
Apr. 22 2016
|
||||||
Added UTF8 token support
|
Added UTF8 token support
|
||||||
|
@ -344,6 +344,7 @@ typedef void (* _unref_func_t)(struct _ref_t*, void*);
|
|||||||
|
|
||||||
typedef unsigned _ref_count_t;
|
typedef unsigned _ref_count_t;
|
||||||
|
|
||||||
|
/* The reference structure should be always at the head of an object */
|
||||||
typedef struct _ref_t {
|
typedef struct _ref_t {
|
||||||
_ref_count_t* count;
|
_ref_count_t* count;
|
||||||
_ref_count_t* weak_count;
|
_ref_count_t* weak_count;
|
||||||
@ -6093,9 +6094,8 @@ static void _init_array(_array_t* arr) {
|
|||||||
mb_assert(arr->count > 0);
|
mb_assert(arr->count > 0);
|
||||||
mb_assert(!arr->raw);
|
mb_assert(!arr->raw);
|
||||||
arr->raw = (void*)mb_malloc(elemsize * arr->count);
|
arr->raw = (void*)mb_malloc(elemsize * arr->count);
|
||||||
if(arr->raw) {
|
if(arr->raw)
|
||||||
memset(arr->raw, 0, elemsize * arr->count);
|
memset(arr->raw, 0, elemsize * arr->count);
|
||||||
}
|
|
||||||
#ifndef MB_SIMPLE_ARRAY
|
#ifndef MB_SIMPLE_ARRAY
|
||||||
arr->types = (_data_e*)mb_malloc(sizeof(_data_e) * arr->count);
|
arr->types = (_data_e*)mb_malloc(sizeof(_data_e) * arr->count);
|
||||||
if(arr->types) {
|
if(arr->types) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user