summaryrefslogtreecommitdiff
path: root/src/lib/eolian/eolian_database.h
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-22 17:05:26 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-22 17:56:52 +0100
commitdb04d3f670b7ad3477cc97667e610ab4f922c4f7 (patch)
tree97a5bddde173660c0fad9f909aeb9b233aed0a5f /src/lib/eolian/eolian_database.h
parentb94649b0ac9ea06f8761ba4130933ba6a71a9df2 (diff)
eolian: introduce main and staging areas properly
The state is now correctly divided. No merging is performed yet, which is to be done next.
Diffstat (limited to 'src/lib/eolian/eolian_database.h')
-rw-r--r--src/lib/eolian/eolian_database.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index a359cdd..4df6b26 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -47,10 +47,25 @@ struct _Eolian_Unit
47 Eina_Hash *objects; 47 Eina_Hash *objects;
48}; 48};
49 49
50struct _Eolian_State 50typedef struct _Eolian_State_Area
51{ 51{
52 Eolian_Unit unit; 52 Eolian_Unit unit;
53 Eolian_Unit staging; 53
54 Eina_Hash *units;
55
56 Eina_Hash *classes_f;
57 Eina_Hash *aliases_f;
58 Eina_Hash *structs_f;
59 Eina_Hash *enums_f;
60 Eina_Hash *globals_f;
61 Eina_Hash *constants_f;
62 Eina_Hash *objects_f;
63} Eolian_State_Area;
64
65struct _Eolian_State
66{
67 Eolian_State_Area main;
68 Eolian_State_Area staging;
54 69
55 Eolian_Panic_Cb panic; 70 Eolian_Panic_Cb panic;
56 Eina_Stringshare *panic_msg; 71 Eina_Stringshare *panic_msg;
@@ -63,15 +78,6 @@ struct _Eolian_State
63 Eina_Hash *filenames_eot; 78 Eina_Hash *filenames_eot;
64 79
65 Eina_Hash *defer; 80 Eina_Hash *defer;
66 Eina_Hash *units;
67
68 Eina_Hash *classes_f;
69 Eina_Hash *aliases_f;
70 Eina_Hash *structs_f;
71 Eina_Hash *enums_f;
72 Eina_Hash *globals_f;
73 Eina_Hash *constants_f;
74 Eina_Hash *objects_f;
75}; 81};
76 82
77struct _Eolian_Object 83struct _Eolian_Object
@@ -107,7 +113,7 @@ eolian_object_add(Eolian_Object *obj, Eina_Stringshare *name, Eina_Hash *hash)
107 113
108#define EOLIAN_OBJECT_ADD(tunit, name, obj, memb) \ 114#define EOLIAN_OBJECT_ADD(tunit, name, obj, memb) \
109{ \ 115{ \
110 eolian_object_add(&obj->base, name, tunit->state->staging.memb); \ 116 eolian_object_add(&obj->base, name, tunit->state->staging.unit.memb); \
111 eolian_object_add(&obj->base, name, tunit->memb); \ 117 eolian_object_add(&obj->base, name, tunit->memb); \
112} 118}
113 119