*refactored struct _routine_t to make sure the _ref_t struct is in front of any referenced struct block.

*refactored struct _routine_t to make sure the _ref_t struct is in front
of any referenced struct block, thus &_ref_t == &(referenced struct).
This commit is contained in:
paladin-t 2016-01-19 13:24:35 +08:00
parent 40e79143b1
commit d157f37ce5

View File

@ -456,12 +456,6 @@ typedef struct _lambda_t {
#endif /* MB_ENABLE_LAMBDA */ #endif /* MB_ENABLE_LAMBDA */
typedef struct _routine_t { typedef struct _routine_t {
char* name;
#ifdef MB_ENABLE_CLASS
_class_t* instance;
#endif /* MB_ENABLE_CLASS */
bool_t is_cloned;
_invokable_e type;
union { union {
struct { struct {
struct _running_context_t* scope; struct _running_context_t* scope;
@ -475,6 +469,12 @@ typedef struct _routine_t {
mb_routine_func_t entry; mb_routine_func_t entry;
} native; } native;
} func; } func;
char* name;
#ifdef MB_ENABLE_CLASS
_class_t* instance;
#endif /* MB_ENABLE_CLASS */
bool_t is_cloned;
_invokable_e type;
} _routine_t; } _routine_t;
#ifdef MB_ENABLE_SOURCE_TRACE #ifdef MB_ENABLE_SOURCE_TRACE