generator: Handle new Callback field type.

This commit is contained in:
Thibault Saunier 2017-10-03 10:12:43 -03:00
parent 2852b771ea
commit 7d902ef7e4
2 changed files with 7 additions and 0 deletions

View file

@ -115,6 +115,10 @@ namespace GtkSharp.Generation {
break; break;
case "field": case "field":
// FIXME Generate callbacks.
if (member.GetAttributeAsBoolean ("is_callback"))
continue;
name = member.GetAttribute("name"); name = member.GetAttribute("name");
while (fields.ContainsKey (name)) while (fields.ContainsKey (name))
name += "mangled"; name += "mangled";

View file

@ -36,6 +36,9 @@ namespace GtkSharp.Generation {
{ {
string cstype = SymbolTable.Table.GetCSType(CType, true); string cstype = SymbolTable.Table.GetCSType(CType, true);
if (elem.GetAttributeAsBoolean("is_callback"))
return true;
if (cstype == null || cstype == "") { if (cstype == null || cstype == "") {
log.Warn (" field \"" + CName + "\" has no cstype, can't generate ABI field."); log.Warn (" field \"" + CName + "\" has no cstype, can't generate ABI field.");