summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx/Eolian_Cxx.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eolian_cxx/Eolian_Cxx.hh')
-rw-r--r--src/lib/eolian_cxx/Eolian_Cxx.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/eolian_cxx/Eolian_Cxx.hh b/src/lib/eolian_cxx/Eolian_Cxx.hh
index 5a8ea813c7..ec5062fee3 100644
--- a/src/lib/eolian_cxx/Eolian_Cxx.hh
+++ b/src/lib/eolian_cxx/Eolian_Cxx.hh
@@ -24,6 +24,24 @@ struct eolian_init
24 } 24 }
25}; 25};
26 26
27struct eolian_state
28{
29 Eolian *value;
30 eolian_state()
31 {
32 value = ::eolian_new();
33 }
34 ~eolian_state()
35 {
36 ::eolian_free(value);
37 }
38
39 inline Eolian_Unit const* as_unit() const
40 {
41 return (Eolian_Unit const*)value;
42 }
43};
44
27} } 45} }
28 46
29#endif // EOLIAN_CXX_LIB_HH 47#endif // EOLIAN_CXX_LIB_HH