summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-02-19 17:09:34 +0000
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-03-03 18:58:11 +0000
commit8614ee1e91020d0a446cb51373d2213b511db3e7 (patch)
tree809fcd1df70aa2550aa3e2c9e17fa0f8b955247e /src/bindings
parentcb42da514bf95f6e458dee0486d667d840c35635 (diff)
elua: update eolian bindings to new typedecl api
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/luajit/eolian.lua244
1 files changed, 176 insertions, 68 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 3192703f7e..f04e06a674 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -15,6 +15,7 @@ ffi.cdef [[
15 typedef struct _Eolian_Class Eolian_Class; 15 typedef struct _Eolian_Class Eolian_Class;
16 typedef struct _Eolian_Function Eolian_Function; 16 typedef struct _Eolian_Function Eolian_Function;
17 typedef struct _Eolian_Type Eolian_Type; 17 typedef struct _Eolian_Type Eolian_Type;
18 typedef struct _Eolian_Typedecl Eolian_Typedecl;
18 typedef struct _Eolian_Function_Parameter Eolian_Function_Parameter; 19 typedef struct _Eolian_Function_Parameter Eolian_Function_Parameter;
19 typedef struct _Eolian_Implement Eolian_Implement; 20 typedef struct _Eolian_Implement Eolian_Implement;
20 typedef struct _Eolian_Constructor Eolian_Constructor; 21 typedef struct _Eolian_Constructor Eolian_Constructor;
@@ -29,7 +30,7 @@ ffi.cdef [[
29 30
30 typedef enum 31 typedef enum
31 { 32 {
32 EOLIAN_UNRESOLVED, 33 EOLIAN_UNRESOLVED = 0,
33 EOLIAN_PROPERTY, 34 EOLIAN_PROPERTY,
34 EOLIAN_PROP_SET, 35 EOLIAN_PROP_SET,
35 EOLIAN_PROP_GET, 36 EOLIAN_PROP_GET,
@@ -38,14 +39,14 @@ ffi.cdef [[
38 39
39 typedef enum 40 typedef enum
40 { 41 {
41 EOLIAN_IN_PARAM, 42 EOLIAN_IN_PARAM = 0,
42 EOLIAN_OUT_PARAM, 43 EOLIAN_OUT_PARAM,
43 EOLIAN_INOUT_PARAM 44 EOLIAN_INOUT_PARAM
44 } Eolian_Parameter_Dir; 45 } Eolian_Parameter_Dir;
45 46
46 typedef enum 47 typedef enum
47 { 48 {
48 EOLIAN_CLASS_UNKNOWN_TYPE, 49 EOLIAN_CLASS_UNKNOWN_TYPE = 0,
49 EOLIAN_CLASS_REGULAR, 50 EOLIAN_CLASS_REGULAR,
50 EOLIAN_CLASS_ABSTRACT, 51 EOLIAN_CLASS_ABSTRACT,
51 EOLIAN_CLASS_MIXIN, 52 EOLIAN_CLASS_MIXIN,
@@ -54,10 +55,18 @@ ffi.cdef [[
54 55
55 typedef enum 56 typedef enum
56 { 57 {
57 EOLIAN_SCOPE_PUBLIC, 58 EOLIAN_SCOPE_PUBLIC = 0,
58 EOLIAN_SCOPE_PROTECTED 59 EOLIAN_SCOPE_PROTECTED
59 } Eolian_Object_Scope; 60 } Eolian_Object_Scope;
60 61
62 typedef enum {
63 EOLIAN_TYPEDECL_UNKNOWN = 0,
64 EOLIAN_TYPEDECL_STRUCT,
65 EOLIAN_TYPEDECL_STRUCT_OPAQUE,
66 EOLIAN_TYPEDECL_ENUM,
67 EOLIAN_TYPEDECL_ALIAS
68 } Eolian_Typedecl_Type;
69
61 typedef enum 70 typedef enum
62 { 71 {
63 EOLIAN_TYPE_UNKNOWN_TYPE, 72 EOLIAN_TYPE_UNKNOWN_TYPE,
@@ -232,7 +241,6 @@ ffi.cdef [[
232 const Eolian_Documentation *eolian_function_return_documentation_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype); 241 const Eolian_Documentation *eolian_function_return_documentation_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
233 Eina_Bool eolian_function_return_is_warn_unused(const Eolian_Function *foo_id, Eolian_Function_Type ftype); 242 Eina_Bool eolian_function_return_is_warn_unused(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
234 Eina_Bool eolian_function_object_is_const(const Eolian_Function *function_id); 243 Eina_Bool eolian_function_object_is_const(const Eolian_Function *function_id);
235 Eina_Bool eolian_type_is_extern(const Eolian_Type *tp);
236 const char *eolian_implement_full_name_get(const Eolian_Implement *impl); 244 const char *eolian_implement_full_name_get(const Eolian_Implement *impl);
237 const Eolian_Class *eolian_implement_class_get(const Eolian_Implement *impl); 245 const Eolian_Class *eolian_implement_class_get(const Eolian_Implement *impl);
238 const Eolian_Function *eolian_implement_function_get(const Eolian_Implement *impl, Eolian_Function_Type *func_type); 246 const Eolian_Function *eolian_implement_function_get(const Eolian_Implement *impl, Eolian_Function_Type *func_type);
@@ -258,40 +266,68 @@ ffi.cdef [[
258 Eina_Bool eolian_class_ctor_enable_get(const Eolian_Class *klass); 266 Eina_Bool eolian_class_ctor_enable_get(const Eolian_Class *klass);
259 Eina_Bool eolian_class_dtor_enable_get(const Eolian_Class *klass); 267 Eina_Bool eolian_class_dtor_enable_get(const Eolian_Class *klass);
260 const char *eolian_class_c_get_function_name_get(const Eolian_Class *klass); 268 const char *eolian_class_c_get_function_name_get(const Eolian_Class *klass);
261 const Eolian_Type *eolian_type_alias_get_by_name(const char *name); 269 const Eolian_Typedecl *eolian_typedecl_alias_get_by_name(const char *name);
262 const Eolian_Type *eolian_type_struct_get_by_name(const char *name); 270 const Eolian_Typedecl *eolian_typedecl_struct_get_by_name(const char *name);
263 const Eolian_Type *eolian_type_enum_get_by_name(const char *name); 271 const Eolian_Typedecl *eolian_typedecl_enum_get_by_name(const char *name);
264 Eina_Iterator *eolian_type_aliases_get_by_file(const char *fname); 272 Eina_Iterator *eolian_typedecl_aliases_get_by_file(const char *fname);
265 Eina_Iterator *eolian_type_structs_get_by_file(const char *fname); 273 Eina_Iterator *eolian_typedecl_structs_get_by_file(const char *fname);
266 Eina_Iterator *eolian_type_enums_get_by_file(const char *fname); 274 Eina_Iterator *eolian_typedecl_enums_get_by_file(const char *fname);
267 Eolian_Type_Type eolian_type_type_get(const Eolian_Type *tp); 275 Eolian_Type_Type eolian_type_type_get(const Eolian_Type *tp);
268 Eina_Iterator *eolian_type_arguments_get(const Eolian_Type *tp); 276 Eolian_Typedecl_Type eolian_typedecl_type_get(const Eolian_Typedecl *tp);
269 Eina_Iterator *eolian_type_subtypes_get(const Eolian_Type *tp); 277 Eina_Iterator *eolian_type_subtypes_get(const Eolian_Type *tp);
270 Eina_Iterator *eolian_type_struct_fields_get(const Eolian_Type *tp); 278 Eina_Iterator *eolian_typedecl_struct_fields_get(const Eolian_Typedecl *tp);
271 const Eolian_Struct_Type_Field *eolian_type_struct_field_get(const Eolian_Type *tp, const char *field); 279 const Eolian_Struct_Type_Field *eolian_typedecl_struct_field_get(const Eolian_Typedecl *tp, const char *field);
280
281 /* TODO */
272 const char *eolian_type_struct_field_name_get(const Eolian_Struct_Type_Field *fl); 282 const char *eolian_type_struct_field_name_get(const Eolian_Struct_Type_Field *fl);
273 const Eolian_Documentation *eolian_type_struct_field_documentation_get(const Eolian_Struct_Type_Field *fl); 283 const Eolian_Documentation *eolian_type_struct_field_documentation_get(const Eolian_Struct_Type_Field *fl);
274 const Eolian_Type *eolian_type_struct_field_type_get(const Eolian_Struct_Type_Field *fl); 284 const Eolian_Type *eolian_type_struct_field_type_get(const Eolian_Struct_Type_Field *fl);
275 Eina_Iterator *eolian_type_enum_fields_get(const Eolian_Type *tp); 285
276 const Eolian_Enum_Type_Field *eolian_type_enum_field_get(const Eolian_Type *tp, const char *field); 286 Eina_Iterator *eolian_typedecl_enum_fields_get(const Eolian_Typedecl *tp);
287 const Eolian_Enum_Type_Field *eolian_typedecl_enum_field_get(const Eolian_Typedecl *tp, const char *field);
288
289 /* TODO */
277 const char *eolian_type_enum_field_name_get(const Eolian_Enum_Type_Field *fl); 290 const char *eolian_type_enum_field_name_get(const Eolian_Enum_Type_Field *fl);
291 const char *eolian_type_enum_field_c_name_get(const Eolian_Enum_Type_Field *fl);
278 const Eolian_Documentation *eolian_type_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl); 292 const Eolian_Documentation *eolian_type_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl);
279 const Eolian_Expression *eolian_type_enum_field_value_get(const Eolian_Enum_Type_Field *fl, Eina_Bool force); 293 const Eolian_Expression *eolian_type_enum_field_value_get(const Eolian_Enum_Type_Field *fl, Eina_Bool force);
280 const char *eolian_type_enum_legacy_prefix_get(const Eolian_Type *tp); 294
281 const Eolian_Documentation *eolian_type_documentation_get(const Eolian_Type *tp); 295 const char *eolian_typedecl_enum_legacy_prefix_get(const Eolian_Typedecl *tp);
296 const Eolian_Documentation *eolian_typedecl_documentation_get(const Eolian_Typedecl *tp);
282 const char *eolian_type_file_get(const Eolian_Type *tp); 297 const char *eolian_type_file_get(const Eolian_Type *tp);
283 const Eolian_Type *eolian_type_return_type_get(const Eolian_Type *tp); 298 const char *eolian_typedecl_file_get(const Eolian_Typedecl *tp);
299
284 const Eolian_Type *eolian_type_base_type_get(const Eolian_Type *tp); 300 const Eolian_Type *eolian_type_base_type_get(const Eolian_Type *tp);
301 const Eolian_Type *eolian_typedecl_base_type_get(const Eolian_Typedecl *tp);
302 const Eolian_Typedecl *eolian_type_typedecl_get(const Eolian_Type *tp);
303
285 const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Type *tp); 304 const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Type *tp);
305 const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Typedecl *tp);
306
286 const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp); 307 const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp);
287 Eina_Bool eolian_type_is_own(const Eolian_Type *tp); 308 Eina_Bool eolian_type_is_own(const Eolian_Type *tp);
288 Eina_Bool eolian_type_is_const(const Eolian_Type *tp); 309 Eina_Bool eolian_type_is_const(const Eolian_Type *tp);
310
311 Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp);
312
289 const char *eolian_type_c_type_named_get(const Eolian_Type *tp, const char *name); 313 const char *eolian_type_c_type_named_get(const Eolian_Type *tp, const char *name);
314 const char *eolian_typedecl_c_type_named_get(const Eolian_Typedecl *tp, const char *name);
315
290 const char *eolian_type_c_type_get(const Eolian_Type *tp); 316 const char *eolian_type_c_type_get(const Eolian_Type *tp);
317 const char *eolian_typedecl_c_type_get(const Eolian_Typedecl *tp);
318
291 const char *eolian_type_name_get(const Eolian_Type *tp); 319 const char *eolian_type_name_get(const Eolian_Type *tp);
320 const char *eolian_typedecl_name_get(const Eolian_Typedecl *tp);
321
292 const char *eolian_type_full_name_get(const Eolian_Type *tp); 322 const char *eolian_type_full_name_get(const Eolian_Type *tp);
323 const char *eolian_typedecl_full_name_get(const Eolian_Typedecl *tp);
324
293 Eina_Iterator *eolian_type_namespaces_get(const Eolian_Type *tp); 325 Eina_Iterator *eolian_type_namespaces_get(const Eolian_Type *tp);
326 Eina_Iterator *eolian_typedecl_namespaces_get(const Eolian_Typedecl *tp);
327
294 const char *eolian_type_free_func_get(const Eolian_Type *tp); 328 const char *eolian_type_free_func_get(const Eolian_Type *tp);
329 const char *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp);
330
295 Eolian_Value_t eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m); 331 Eolian_Value_t eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m);
296 Eolian_Value_t eolian_expression_eval_type(const Eolian_Expression *expr, const Eolian_Type *type); 332 Eolian_Value_t eolian_expression_eval_type(const Eolian_Expression *expr, const Eolian_Type *type);
297 const char *eolian_expression_value_to_literal(const Eolian_Value *v); 333 const char *eolian_expression_value_to_literal(const Eolian_Value *v);
@@ -416,20 +452,29 @@ M.declaration_type = {
416} 452}
417 453
418M.type_type = { 454M.type_type = {
419 UNKNOWN = 0, 455 UNKNOWN = 0,
420 VOID = 1, 456 VOID = 1,
421 REGULAR = 2, 457 REGULAR = 2,
422 COMPLEX = 3, 458 COMPLEX = 3,
423 POINTER = 4, 459 POINTER = 4,
424 FUNCTION = 5, 460 FUNCTION = 5,
425 STRUCT = 6, 461 STRUCT = 6,
426 STRUCT_OPAQUE = 7, 462 STRUCT_OPAQUE = 7,
427 ENUM = 8, 463 ENUM = 8,
428 ALIAS = 9, 464 ALIAS = 9,
429 CLASS = 10, 465 CLASS = 10,
430 UNDEFINED = 11 466 UNDEFINED = 11
467}
468
469M.typedecl_type = {
470 UNKNOWN = 0,
471 STRUCT = 1,
472 STRUCT_OPAQUE = 2,
473 ENUM = 3,
474 ALIAS = 4
431} 475}
432 476
477-- TODO change func sigs
433ffi.metatype("Eolian_Struct_Type_Field", { 478ffi.metatype("Eolian_Struct_Type_Field", {
434 __index = { 479 __index = {
435 name_get = function(self) 480 name_get = function(self)
@@ -452,6 +497,7 @@ ffi.metatype("Eolian_Struct_Type_Field", {
452 } 497 }
453}) 498})
454 499
500-- TODO change func sigs
455ffi.metatype("Eolian_Enum_Type_Field", { 501ffi.metatype("Eolian_Enum_Type_Field", {
456 __index = { 502 __index = {
457 name_get = function(self) 503 name_get = function(self)
@@ -460,6 +506,12 @@ ffi.metatype("Eolian_Enum_Type_Field", {
460 return ffi.string(v) 506 return ffi.string(v)
461 end, 507 end,
462 508
509 c_name_get = function(self)
510 local v = eolian.eolian_type_enum_field_c_name_get(self)
511 if v == nil then return nil end
512 return ffi_stringshare(v)
513 end,
514
463 documentation_get = function(self) 515 documentation_get = function(self)
464 local v = eolian.eolian_type_enum_field_documentation_get(self) 516 local v = eolian.eolian_type_enum_field_documentation_get(self)
465 if v == nil then return nil end 517 if v == nil then return nil end
@@ -474,74 +526,134 @@ ffi.metatype("Eolian_Enum_Type_Field", {
474 } 526 }
475}) 527})
476 528
477M.Type = ffi.metatype("Eolian_Type", { 529M.Typedecl = ffi.metatype("Eolian_Typedecl", {
478 __index = { 530 __index = {
479 type_get = function(self) 531 type_get = function(self)
480 return tonumber(eolian.eolian_type_type_get(self)) 532 return tonumber(eolian.eolian_typedecl_type_get(self))
481 end,
482
483 arguments_get = function(self)
484 return Ptr_Iterator("const Eolian_Type*",
485 eolian.eolian_type_arguments_get(self))
486 end,
487
488 subtypes_get = function(self)
489 return Ptr_Iterator("const Eolian_Type*",
490 eolian.eolian_type_subtypes_get(self))
491 end, 533 end,
492 534
493 struct_fields_get = function(self) 535 struct_fields_get = function(self)
494 return Ptr_Iterator("const Eolian_Struct_Type_Field*", 536 return Ptr_Iterator("const Eolian_Struct_Type_Field*",
495 eolian.eolian_type_struct_fields_get(self)) 537 eolian.eolian_typedecl_struct_fields_get(self))
496 end, 538 end,
497 539
498 struct_field_get = function(self, name) 540 struct_field_get = function(self, name)
499 local v = eolian.eolian_type_struct_field_get(self, name) 541 local v = eolian.eolian_typedecl_struct_field_get(self, name)
500 if v == nil then return nil end 542 if v == nil then return nil end
501 return v 543 return v
502 end, 544 end,
503 545
504 enum_fields_get = function(self) 546 enum_fields_get = function(self)
505 return Ptr_Iterator("const Eolian_Enum_Type_Field*", 547 return Ptr_Iterator("const Eolian_Enum_Type_Field*",
506 eolian.eolian_type_enum_fields_get(self)) 548 eolian.eolian_typedecl_enum_fields_get(self))
507 end, 549 end,
508 550
509 enum_field_get = function(self, field) 551 enum_field_get = function(self, field)
510 local v = eolian.eolian_type_enum_field_get(self, field) 552 local v = eolian.eolian_typedecl_enum_field_get(self, field)
511 if v == nil then return nil end 553 if v == nil then return nil end
512 return v 554 return v
513 end, 555 end,
514 556
515 enum_legacy_prefix_get = function(self) 557 enum_legacy_prefix_get = function(self)
516 local v = eolian.eolian_type_enum_legacy_prefix_get(self) 558 local v = eolian.eolian_typedecl_enum_legacy_prefix_get(self)
517 if v == nil then return nil end 559 if v == nil then return nil end
518 return ffi.string(v) 560 return ffi.string(v)
519 end, 561 end,
520 562
521 documentation_get = function(self, name) 563 documentation_get = function(self, name)
522 local v = eolian.eolian_type_documentation_get(self) 564 local v = eolian.eolian_typedecl_documentation_get(self)
523 if v == nil then return nil end 565 if v == nil then return nil end
524 return v 566 return v
525 end, 567 end,
526 568
527 file_get = function(self, name) 569 file_get = function(self, name)
528 local v = eolian.eolian_type_file_get(self) 570 local v = eolian.eolian_typedecl_file_get(self)
529 if v == nil then return nil end 571 if v == nil then return nil end
530 return ffi.string(v) 572 return ffi.string(v)
531 end, 573 end,
532 574
533 return_type_get = function(self) 575 base_type_get = function(self)
534 local v = eolian.eolian_type_return_type_get(self) 576 local v = eolian.eolian_typedecl_base_type_get(self)
535 if v == nil then return nil end 577 if v == nil then return nil end
536 return v 578 return v
537 end, 579 end,
538 580
581 aliased_base_get = function(self)
582 local v = eolian.eolian_typedecl_aliased_byse_get(self)
583 if v == nil then return nil end
584 return v
585 end,
586
587 is_extern = function(self)
588 return eolian.eolian_typedecl_is_extern(self) ~= 0
589 end,
590
591 c_type_named_get = function(self, name)
592 local v = eolian.eolian_typedecl_c_type_named_get(self, name)
593 if v == nil then return nil end
594 return ffi_stringshare(v)
595 end,
596
597 c_type_get = function(self)
598 local v = eolian.eolian_typedecl_c_type_get(self)
599 if v == nil then return nil end
600 return ffi_stringshare(v)
601 end,
602
603 name_get = function(self)
604 local v = eolian.eolian_typedecl_name_get(self)
605 if v == nil then return nil end
606 return ffi.string(v)
607 end,
608
609 full_name_get = function(self)
610 local v = eolian.eolian_typedecl_full_name_get(self)
611 if v == nil then return nil end
612 return ffi.string(v)
613 end,
614
615 namespaces_get = function(self)
616 return iterator.String_Iterator(
617 eolian.eolian_typedecl_namespaces_get(self))
618 end,
619
620 free_func_get = function(self)
621 local v = eolian.eolian_typedecl_free_func_get(self)
622 if v == nil then return nil end
623 return ffi.string(v)
624 end
625 }
626})
627
628M.Type = ffi.metatype("Eolian_Type", {
629 __index = {
630 type_get = function(self)
631 return tonumber(eolian.eolian_type_type_get(self))
632 end,
633
634 subtypes_get = function(self)
635 return Ptr_Iterator("const Eolian_Type*",
636 eolian.eolian_type_subtypes_get(self))
637 end,
638
639 file_get = function(self, name)
640 local v = eolian.eolian_type_file_get(self)
641 if v == nil then return nil end
642 return ffi.string(v)
643 end,
644
539 base_type_get = function(self) 645 base_type_get = function(self)
540 local v = eolian.eolian_type_base_type_get(self) 646 local v = eolian.eolian_type_base_type_get(self)
541 if v == nil then return nil end 647 if v == nil then return nil end
542 return v 648 return v
543 end, 649 end,
544 650
651 typedecl_get = function(self)
652 local v = eolian.eolian_type_typedecl_get(self)
653 if v == nil then return nil end
654 return v
655 end,
656
545 aliased_base_get = function(self) 657 aliased_base_get = function(self)
546 local v = eolian.eolian_type_aliased_byse_get(self) 658 local v = eolian.eolian_type_aliased_byse_get(self)
547 if v == nil then return nil end 659 if v == nil then return nil end
@@ -562,10 +674,6 @@ M.Type = ffi.metatype("Eolian_Type", {
562 return eolian.eolian_type_is_const(self) ~= 0 674 return eolian.eolian_type_is_const(self) ~= 0
563 end, 675 end,
564 676
565 is_extern = function(self)
566 return eolian.eolian_type_is_extern(self) ~= 0
567 end,
568
569 c_type_named_get = function(self, name) 677 c_type_named_get = function(self, name)
570 local v = eolian.eolian_type_c_type_named_get(self, name) 678 local v = eolian.eolian_type_c_type_named_get(self, name)
571 if v == nil then return nil end 679 if v == nil then return nil end
@@ -1002,36 +1110,36 @@ M.Class = ffi.metatype("Eolian_Class", {
1002 } 1110 }
1003}) 1111})
1004 1112
1005M.type_alias_get_by_name = function(name) 1113M.typedecl_alias_get_by_name = function(name)
1006 local v = eolian.eolian_type_alias_get_by_name(name) 1114 local v = eolian.eolian_typedecl_alias_get_by_name(name)
1007 if v == nil then return nil end 1115 if v == nil then return nil end
1008 return v 1116 return v
1009end 1117end
1010 1118
1011M.type_struct_get_by_name = function(name) 1119M.typedecl_struct_get_by_name = function(name)
1012 local v = eolian.eolian_type_struct_get_by_name(name) 1120 local v = eolian.eolian_typedecl_struct_get_by_name(name)
1013 if v == nil then return nil end 1121 if v == nil then return nil end
1014 return v 1122 return v
1015end 1123end
1016 1124
1017M.type_enum_get_by_name = function(name) 1125M.typedecl_enum_get_by_name = function(name)
1018 local v = eolian.eolian_type_enum_get_by_name(name) 1126 local v = eolian.eolian_typedecl_enum_get_by_name(name)
1019 if v == nil then return nil end 1127 if v == nil then return nil end
1020 return v 1128 return v
1021end 1129end
1022 1130
1023M.type_aliases_get_by_file = function(fname) 1131M.typedecl_aliases_get_by_file = function(fname)
1024 return Ptr_Iterator("const Eolian_Type*", 1132 return Ptr_Iterator("const Eolian_Typedecl *",
1025 eolian.eolian_type_aliases_get_by_file(self)) 1133 eolian.eolian_type_aliases_get_by_file(self))
1026end 1134end
1027 1135
1028M.type_structs_get_by_file = function(fname) 1136M.typedecl_structs_get_by_file = function(fname)
1029 return Ptr_Iterator("const Eolian_Type*", 1137 return Ptr_Iterator("const Eolian_Typedecl *",
1030 eolian.eolian_type_structs_get_by_file(self)) 1138 eolian.eolian_type_structs_get_by_file(self))
1031end 1139end
1032 1140
1033M.type_enums_get_by_file = function(fname) 1141M.typedecl_enums_get_by_file = function(fname)
1034 return Ptr_Iterator("const Eolian_Type*", 1142 return Ptr_Iterator("const Eolian_Typedecl *",
1035 eolian.eolian_type_enums_get_by_file(self)) 1143 eolian.eolian_type_enums_get_by_file(self))
1036end 1144end
1037 1145