summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-09 15:25:11 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-09 15:25:36 +0100
commit342974977f4e0887248fdef9eb980f5c1e82ffb5 (patch)
tree0e208aba51e61e69f63646d2e94d4f61977a27b1
parentc7fd43ad4ed8d4a8067326ff727fa69681bd9101 (diff)
eolian: resolve to Eolian_Objects instead of voids
Diffstat (limited to '')
-rw-r--r--src/bindings/luajit/eolian.lua4
-rw-r--r--src/lib/eolian/Eolian.h2
-rw-r--r--src/lib/eolian/eolian_database.c22
-rw-r--r--src/scripts/pyolian/eolian_lib.py2
4 files changed, 15 insertions, 15 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index ac8ad59b94..70d66cb5a9 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -481,7 +481,7 @@ ffi.cdef [[
481 void eolian_doc_token_init(Eolian_Doc_Token *tok); 481 void eolian_doc_token_init(Eolian_Doc_Token *tok);
482 Eolian_Doc_Token_Type eolian_doc_token_type_get(const Eolian_Doc_Token *tok); 482 Eolian_Doc_Token_Type eolian_doc_token_type_get(const Eolian_Doc_Token *tok);
483 char *eolian_doc_token_text_get(const Eolian_Doc_Token *tok); 483 char *eolian_doc_token_text_get(const Eolian_Doc_Token *tok);
484 Eolian_Object_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2); 484 Eolian_Object_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const Eolian_Object **data, const Eolian_Object **data2);
485]] 485]]
486 486
487local cutil = require("cutil") 487local cutil = require("cutil")
@@ -1853,7 +1853,7 @@ M.Eolian_Doc_Token = ffi.metatype("Eolian_Doc_Token", {
1853 end, 1853 end,
1854 1854
1855 ref_get = function(self, unit) 1855 ref_get = function(self, unit)
1856 local stor = ffi.new("const void *[2]") 1856 local stor = ffi.new("const Eolian_Object *[2]")
1857 local tp = tonumber(eolian.eolian_doc_token_ref_get(unit, self, stor, stor + 1)) 1857 local tp = tonumber(eolian.eolian_doc_token_ref_get(unit, self, stor, stor + 1))
1858 local reft = M.object_type 1858 local reft = M.object_type
1859 if tp == reft.CLASS then 1859 if tp == reft.CLASS then
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 1d34e0df21..bde88caa05 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -2780,7 +2780,7 @@ EAPI char *eolian_doc_token_text_get(const Eolian_Doc_Token *tok);
2780 * @param[out] data2 the secondary data 2780 * @param[out] data2 the secondary data
2781 * @return the kind of reference this is 2781 * @return the kind of reference this is
2782 */ 2782 */
2783EAPI Eolian_Object_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2); 2783EAPI Eolian_Object_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const Eolian_Object **data, const Eolian_Object **data2);
2784 2784
2785#endif 2785#endif
2786 2786
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index bd4d22a35a..52125bf656 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -290,8 +290,8 @@ eolian_doc_token_text_get(const Eolian_Doc_Token *tok)
290} 290}
291 291
292static Eolian_Object_Type 292static Eolian_Object_Type
293_resolve_event(const Eolian_Unit *src, char *name, const void **data, 293_resolve_event(const Eolian_Unit *src, char *name, const Eolian_Object **data,
294 const void **data2) 294 const Eolian_Object **data2)
295{ 295{
296 /* never trust the user */ 296 /* never trust the user */
297 if (name[0] == ',') 297 if (name[0] == ',')
@@ -310,14 +310,14 @@ _resolve_event(const Eolian_Unit *src, char *name, const void **data,
310 if (!ev) 310 if (!ev)
311 return EOLIAN_OBJECT_UNKNOWN; 311 return EOLIAN_OBJECT_UNKNOWN;
312 312
313 if (data) *data = cl; 313 if (data) *data = &cl->base;
314 if (data2) *data2 = ev; 314 if (data2) *data2 = &ev->base;
315 return EOLIAN_OBJECT_EVENT; 315 return EOLIAN_OBJECT_EVENT;
316} 316}
317 317
318EAPI Eolian_Object_Type 318EAPI Eolian_Object_Type
319eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, 319eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
320 const void **data, const void **data2) 320 const Eolian_Object **data, const Eolian_Object **data2)
321{ 321{
322 if (tok->type != EOLIAN_DOC_TOKEN_REF) 322 if (tok->type != EOLIAN_DOC_TOKEN_REF)
323 return EOLIAN_OBJECT_UNKNOWN; 323 return EOLIAN_OBJECT_UNKNOWN;
@@ -374,8 +374,8 @@ eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
374 /* field itself is invalid */ 374 /* field itself is invalid */
375 if (!fld) 375 if (!fld)
376 return EOLIAN_OBJECT_UNKNOWN; 376 return EOLIAN_OBJECT_UNKNOWN;
377 if (data) *data = tpd; 377 if (data) *data = &tpd->base;
378 if (data2) *data2 = fld; 378 if (data2) *data2 = &fld->base;
379 return EOLIAN_OBJECT_STRUCT_FIELD; 379 return EOLIAN_OBJECT_STRUCT_FIELD;
380 } 380 }
381 381
@@ -387,8 +387,8 @@ eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
387 /* field itself is invalid */ 387 /* field itself is invalid */
388 if (!fld) 388 if (!fld)
389 return EOLIAN_OBJECT_UNKNOWN; 389 return EOLIAN_OBJECT_UNKNOWN;
390 if (data) *data = tpd; 390 if (data) *data = &tpd->base;
391 if (data2) *data2 = fld; 391 if (data2) *data2 = &fld->base;
392 return EOLIAN_OBJECT_ENUM_FIELD; 392 return EOLIAN_OBJECT_ENUM_FIELD;
393 } 393 }
394 394
@@ -419,8 +419,8 @@ eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
419 return EOLIAN_OBJECT_UNKNOWN; 419 return EOLIAN_OBJECT_UNKNOWN;
420 420
421 /* got a func */ 421 /* got a func */
422 if (data) *data = cl; 422 if (data) *data = &cl->base;
423 if (data2) *data2 = fid; 423 if (data2) *data2 = &fid->base;
424 return EOLIAN_OBJECT_FUNCTION; 424 return EOLIAN_OBJECT_FUNCTION;
425} 425}
426 426
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py
index 30d124fc05..bf333b675d 100644
--- a/src/scripts/pyolian/eolian_lib.py
+++ b/src/scripts/pyolian/eolian_lib.py
@@ -831,7 +831,7 @@ lib.eolian_doc_token_type_get.restype = c_int
831lib.eolian_doc_token_text_get.argtypes = [c_void_p,] 831lib.eolian_doc_token_text_get.argtypes = [c_void_p,]
832lib.eolian_doc_token_text_get.restype = c_void_p # char* TO BE FREED 832lib.eolian_doc_token_text_get.restype = c_void_p # char* TO BE FREED
833 833
834# EAPI Eolian_Object_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2); 834# EAPI Eolian_Object_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const Eolian_Object **data, const Eolian_Object **data2);
835# lib.eolian_doc_token_ref_get.argtypes = [c_void_p, c_void_p, ???, ???] 835# lib.eolian_doc_token_ref_get.argtypes = [c_void_p, c_void_p, ???, ???]
836# lib.eolian_doc_token_ref_get.restype = c_int 836# lib.eolian_doc_token_ref_get.restype = c_int
837 837