forked from enlightenment/efl
mono: encapsulate internal delegates
Summary: Depends on D10337 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: segfaultxavi, Jaehyun_Cho, YOhoho, brunobelo Reviewed By: YOhoho Subscribers: cedric, #reviewers, #committers, woohyun Tags: #efl Differential Revision: https://phab.enlightenment.org/D10339
This commit is contained in:
parent
2477dfaf59
commit
46ebd2033b
|
@ -76,7 +76,7 @@ struct native_function_definition_generator
|
|||
if(!as_generator
|
||||
(
|
||||
indent << eolian_mono::marshall_annotation(true) << "\n"
|
||||
<< indent << "public delegate "
|
||||
<< indent << "internal delegate "
|
||||
<< eolian_mono::marshall_type(true)
|
||||
<< " "
|
||||
<< string << "_api_delegate(" << (f.is_static ? "" : "System.IntPtr obj")
|
||||
|
@ -91,7 +91,7 @@ struct native_function_definition_generator
|
|||
|
||||
// Delegate holder (so it can't be collected).
|
||||
if(!as_generator
|
||||
(indent << "public static readonly Efl.Eo.FunctionWrapper<" << string << "_api_delegate> " << string << "_ptr = new Efl.Eo.FunctionWrapper<"
|
||||
(indent << "internal static readonly Efl.Eo.FunctionWrapper<" << string << "_api_delegate> " << string << "_ptr = new Efl.Eo.FunctionWrapper<"
|
||||
<< string << "_api_delegate>(Module, \"" << string << "\");\n\n")
|
||||
.generate(sink, std::make_tuple(f.c_name, f.c_name, f.c_name, f.c_name), context))
|
||||
return false;
|
||||
|
|
|
@ -66,7 +66,7 @@ struct function_pointer {
|
|||
return false;
|
||||
// "Internal" delegate, 1-to-1 with the Unamaged function type
|
||||
if (!as_generator(marshall_annotation(true)
|
||||
<< "public delegate " << marshall_type(true) << " " << string // public?
|
||||
<< "internal delegate " << marshall_type(true) << " " << string // public?
|
||||
<< "Internal(IntPtr data" << *grammar::attribute_reorder<-1, -1>((", " << marshall_annotation << " " << marshall_parameter)) << ");\n")
|
||||
.generate(sink, std::make_tuple(f.return_type, f.return_type, f_name, f.parameters), funcptr_ctx))
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue