free(cl);
}
-
-Eolian_Class *
-database_class_add(const char *class_name, Eolian_Class_Type type)
-{
- char *full_name = strdup(class_name);
- char *name = full_name;
- char *colon = full_name;
- Eolian_Class *cl = calloc(1, sizeof(*cl));
- cl->full_name = eina_stringshare_add(class_name);
- cl->type = type;
- do
- {
- colon = strchr(colon, '.');
- if (colon)
- {
- *colon = '\0';
- cl->namespaces = eina_list_append(cl->namespaces,
- eina_stringshare_add(name));
- colon += 1;
- name = colon;
- }
- }
- while(colon);
- cl->name = eina_stringshare_add(name);
- eina_hash_set(_classes, cl->full_name, cl);
- free(full_name);
- return cl;
-}
static Eina_Bool
_db_fill_class(Eolian_Class *kls)
{
- Eolian_Class *cl = database_class_add(kls->name, kls->type);
+ Eolian_Class *cl = calloc(1, sizeof(Eolian_Class));
const char *s;
Eina_List *l;
+ eina_hash_set(_classes, kls->full_name, cl);
eina_hash_set(_classesf, kls->base.file, cl);
+ cl->namespaces = kls->namespaces; kls->namespaces = NULL;
+ cl->full_name = kls->full_name; kls->full_name = NULL;
+ cl->name = kls->name; kls->name = NULL;
+ cl->type = kls->type;
+
if (kls->description)
cl->description = eina_stringshare_ref(kls->description);
eo_lexer_syntax_error(ls, "class and file names differ");
}
eo_lexer_context_pop(ls);
- ls->tmp.kls->name = eina_stringshare_add(eina_strbuf_string_get(buf));
+ _fill_class_name(ls->tmp.kls, eina_stringshare_add(eina_strbuf_string_get
+ (buf)));
pop_strbuf(ls);
if (ls->t.token != '{')
{
Eina_Bool database_var_add(Eolian_Variable *var);
/* classes */
-
-Eolian_Class *database_class_add(const char *class_name, Eolian_Class_Type type);
void database_class_del(Eolian_Class *cl);
/* functions */
void database_parameter_del(Eolian_Function_Parameter *pdesc);
/* implements */
-
void database_implement_del(Eolian_Implement *impl);
/* constructors */
-
void database_constructor_del(Eolian_Constructor *ctor);
/* events */