fix object create error
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@916 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
446799244a
commit
a8eff5c965
@ -35,7 +35,7 @@
|
|||||||
#define IS_AX(s) ((s.sh_flags & SHF_ALLOC) && (s.sh_flags & SHF_EXECINSTR))
|
#define IS_AX(s) ((s.sh_flags & SHF_ALLOC) && (s.sh_flags & SHF_EXECINSTR))
|
||||||
#define IS_AW(s) ((s.sh_flags & SHF_ALLOC) && (s.sh_flags & SHF_WRITE))
|
#define IS_AW(s) ((s.sh_flags & SHF_ALLOC) && (s.sh_flags & SHF_WRITE))
|
||||||
|
|
||||||
static struct rt_module* rt_current_module;
|
static struct rt_module* rt_current_module = RT_NULL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function will return self module object
|
* This function will return self module object
|
||||||
|
@ -258,10 +258,10 @@ rt_object_t rt_object_allocate(enum rt_object_class_type type, const char* name)
|
|||||||
#ifdef RT_USING_MODULE
|
#ifdef RT_USING_MODULE
|
||||||
/* get module object information */
|
/* get module object information */
|
||||||
information = (rt_module_self() != RT_NULL) ?
|
information = (rt_module_self() != RT_NULL) ?
|
||||||
&rt_module_self()->module_object[type] : &rt_module_self()[type];
|
&rt_module_self()->module_object[type] : &rt_object_container[type];
|
||||||
#else
|
#else
|
||||||
/* get object information */
|
/* get object information */
|
||||||
information = &rt_module_self()[type];
|
information = &rt_object_container[type];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
object = (struct rt_object*)rt_malloc(information->object_size);
|
object = (struct rt_object*)rt_malloc(information->object_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user