summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-08 12:19:15 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-08 12:19:15 -0300
commitf683efd2c1082743c667e8b500b857cc852250be (patch)
treed03c5324ab9ba4630f50cbb3b86b677a061ad6f5 /src/lib/eolian_cxx
parentb87c4f6de82065b22c2dab32acf27afcbd3824cb (diff)
eolian-cxx: Fix generation of some primitive types
Fix translation of primitive types for C++ binding
Diffstat (limited to 'src/lib/eolian_cxx')
-rw-r--r--src/lib/eolian_cxx/grammar/type_impl.hpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/lib/eolian_cxx/grammar/type_impl.hpp b/src/lib/eolian_cxx/grammar/type_impl.hpp
index 0827f571f6..a1013ef5a7 100644
--- a/src/lib/eolian_cxx/grammar/type_impl.hpp
+++ b/src/lib/eolian_cxx/grammar/type_impl.hpp
@@ -111,8 +111,28 @@ struct visitor_generate
111 pointers.insert(pointers.begin(), {{attributes::qualifier_info::is_none, {}}, false}); 111 pointers.insert(pointers.begin(), {{attributes::qualifier_info::is_none, {}}, false});
112 return attributes::regular_type_def{"void", regular.base_qualifier, pointers, {}}; 112 return attributes::regular_type_def{"void", regular.base_qualifier, pointers, {}};
113 } 113 }
114 , {"size", nullptr, [&] { return replace_base_type(regular, " ::std::size_t"); }} 114 // signed primitives
115 , {"byte", nullptr, [&] { return replace_base_type(regular, " char"); }}
116 , {"llong", nullptr, [&] { return replace_base_type(regular, " long long"); }}
117 , {"int8", nullptr, [&] { return replace_base_type(regular, " int8_t"); }}
118 , {"int16", nullptr, [&] { return replace_base_type(regular, " int16_t"); }}
119 , {"int32", nullptr, [&] { return replace_base_type(regular, " int32_t"); }}
120 , {"int64", nullptr, [&] { return replace_base_type(regular, " int64_t"); }}
121 , {"ssize", nullptr, [&] { return replace_base_type(regular, " ssize_t"); }}
122 // unsigned primitives
115 , {"ubyte", nullptr, [&] { return replace_base_type(regular, " unsigned char"); }} 123 , {"ubyte", nullptr, [&] { return replace_base_type(regular, " unsigned char"); }}
124 , {"ushort", nullptr, [&] { return replace_base_type(regular, " unsigned short"); }}
125 , {"uint", nullptr, [&] { return replace_base_type(regular, " unsigned int"); }}
126 , {"ulong", nullptr, [&] { return replace_base_type(regular, " unsigned long"); }}
127 , {"ullong", nullptr, [&] { return replace_base_type(regular, " unsigned long long"); }}
128 , {"uint8", nullptr, [&] { return replace_base_type(regular, " uint8_t"); }}
129 , {"uint16", nullptr, [&] { return replace_base_type(regular, " uint16_t"); }}
130 , {"uint32", nullptr, [&] { return replace_base_type(regular, " uint32_t"); }}
131 , {"uint64", nullptr, [&] { return replace_base_type(regular, " uint64_t"); }}
132 , {"size", nullptr, [&] { return replace_base_type(regular, " size_t"); }}
133
134 , {"ptrdiff", nullptr, [&] { return replace_base_type(regular, " ptrdiff_t"); }}
135 , {"intptr", nullptr, [&] { return replace_base_type(regular, " intptr_t"); }}
116 , {"string", true, [&] { return replace_base_type(regular, " ::std::string"); }} 136 , {"string", true, [&] { return replace_base_type(regular, " ::std::string"); }}
117 , {"string", false, [&] { return replace_base_type(regular, " ::efl::eina::string_view"); }} 137 , {"string", false, [&] { return replace_base_type(regular, " ::efl::eina::string_view"); }}
118 , {"generic_value", nullptr, [&] 138 , {"generic_value", nullptr, [&]