summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/eolian/database_validate.c16
-rw-r--r--src/lib/eolian/eolian_database.c6
-rw-r--r--src/lib/eolian/eolian_database.h2
3 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index b2e0780..3536a05 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -417,7 +417,7 @@ _validate_part(const Eolian_Unit *src, Eolian_Part *part, Eina_Hash *nhash)
417 return EINA_FALSE; 417 return EINA_FALSE;
418 418
419 /* switch the class name for class */ 419 /* switch the class name for class */
420 Eolian_Class *pcl = eina_hash_find(src->state->unit.classes, part->klass_name); 420 Eolian_Class *pcl = eina_hash_find(src->classes, part->klass_name);
421 if (!pcl) 421 if (!pcl)
422 { 422 {
423 char buf[PATH_MAX]; 423 char buf[PATH_MAX];
@@ -677,7 +677,7 @@ _db_fill_inherits(const Eolian_Unit *src, Eolian_Class *cl, Eina_Hash *fhash)
677 eina_stringshare_del(inn); 677 eina_stringshare_del(inn);
678 continue; 678 continue;
679 } 679 }
680 Eolian_Class *icl = eina_hash_find(src->state->unit.classes, inn); 680 Eolian_Class *icl = eina_hash_find(src->classes, inn);
681 if (!icl) 681 if (!icl)
682 { 682 {
683 succ = EINA_FALSE; 683 succ = EINA_FALSE;
@@ -846,7 +846,7 @@ _var_map_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
846} 846}
847 847
848Eina_Bool 848Eina_Bool
849database_validate(Eolian_State *state, const Eolian_Unit *src) 849database_validate(const Eolian_Unit *src)
850{ 850{
851 Eolian_Class *cl; 851 Eolian_Class *cl;
852 852
@@ -888,23 +888,23 @@ database_validate(Eolian_State *state, const Eolian_Unit *src)
888 888
889 Cb_Ret rt = { src, &vals, EINA_TRUE }; 889 Cb_Ret rt = { src, &vals, EINA_TRUE };
890 890
891 eina_hash_foreach(state->unit.aliases, (Eina_Hash_Foreach)_typedecl_map_cb, &rt); 891 eina_hash_foreach(src->aliases, (Eina_Hash_Foreach)_typedecl_map_cb, &rt);
892 if (!rt.succ) 892 if (!rt.succ)
893 return EINA_FALSE; 893 return EINA_FALSE;
894 894
895 eina_hash_foreach(state->unit.structs, (Eina_Hash_Foreach)_typedecl_map_cb, &rt); 895 eina_hash_foreach(src->structs, (Eina_Hash_Foreach)_typedecl_map_cb, &rt);
896 if (!rt.succ) 896 if (!rt.succ)
897 return EINA_FALSE; 897 return EINA_FALSE;
898 898
899 eina_hash_foreach(state->unit.enums, (Eina_Hash_Foreach)_typedecl_map_cb, &rt); 899 eina_hash_foreach(src->enums, (Eina_Hash_Foreach)_typedecl_map_cb, &rt);
900 if (!rt.succ) 900 if (!rt.succ)
901 return EINA_FALSE; 901 return EINA_FALSE;
902 902
903 eina_hash_foreach(state->unit.globals, (Eina_Hash_Foreach)_var_map_cb, &rt); 903 eina_hash_foreach(src->globals, (Eina_Hash_Foreach)_var_map_cb, &rt);
904 if (!rt.succ) 904 if (!rt.succ)
905 return EINA_FALSE; 905 return EINA_FALSE;
906 906
907 eina_hash_foreach(state->unit.constants, (Eina_Hash_Foreach)_var_map_cb, &rt); 907 eina_hash_foreach(src->constants, (Eina_Hash_Foreach)_var_map_cb, &rt);
908 if (!rt.succ) 908 if (!rt.succ)
909 return EINA_FALSE; 909 return EINA_FALSE;
910 910
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index f3fc255..ef96b1a 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -806,7 +806,7 @@ eolian_state_file_parse(Eolian_State *state, const char *filepath)
806 if (!_parse_deferred(ret)) 806 if (!_parse_deferred(ret))
807 return NULL; 807 return NULL;
808 _merge_units(ret); 808 _merge_units(ret);
809 if (!database_validate(state, ret)) 809 if (!database_validate(ret))
810 return NULL; 810 return NULL;
811 return &state->unit; 811 return &state->unit;
812} 812}
@@ -839,7 +839,7 @@ eolian_state_all_eot_files_parse(Eolian_State *state)
839 839
840 eina_hash_foreach(state->filenames_eot, _tfile_parse, &pd); 840 eina_hash_foreach(state->filenames_eot, _tfile_parse, &pd);
841 841
842 if (pd.ret && !database_validate(state, &state->unit)) 842 if (pd.ret && !database_validate(&state->unit))
843 return EINA_FALSE; 843 return EINA_FALSE;
844 844
845 return pd.ret; 845 return pd.ret;
@@ -867,7 +867,7 @@ eolian_state_all_eo_files_parse(Eolian_State *state)
867 867
868 eina_hash_foreach(state->filenames_eo, _file_parse, &pd); 868 eina_hash_foreach(state->filenames_eo, _file_parse, &pd);
869 869
870 if (pd.ret && !database_validate(state, &state->unit)) 870 if (pd.ret && !database_validate(&state->unit))
871 return EINA_FALSE; 871 return EINA_FALSE;
872 872
873 return pd.ret; 873 return pd.ret;
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 347974b..28ff787 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -314,7 +314,7 @@ struct _Eolian_Variable
314}; 314};
315 315
316char *database_class_to_filename(const char *cname); 316char *database_class_to_filename(const char *cname);
317Eina_Bool database_validate(Eolian_State *state, const Eolian_Unit *src); 317Eina_Bool database_validate(const Eolian_Unit *src);
318 318
319void database_object_add(Eolian_Unit *unit, const Eolian_Object *obj); 319void database_object_add(Eolian_Unit *unit, const Eolian_Object *obj);
320 320