generator: Added count param detection for return values
This commit is contained in:
parent
edde96c5be
commit
f6219b97e0
2 changed files with 9 additions and 0 deletions
|
@ -56,6 +56,8 @@ namespace GtkSharp.Generation {
|
|||
|
||||
if (!String.IsNullOrEmpty (retval.CountParameterName))
|
||||
retval.CountParameter = parms.GetCountParameter (retval.CountParameterName);
|
||||
if (retval.CountParameterIndex >= 0)
|
||||
retval.CountParameter = parms[retval.CountParameterIndex];
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace GtkSharp.Generation {
|
|||
bool elements_owned;
|
||||
bool owned;
|
||||
string array_length_param = String.Empty;
|
||||
int array_length_param_index = -1;
|
||||
string ctype = String.Empty;
|
||||
string default_value = String.Empty;
|
||||
string element_ctype = String.Empty;
|
||||
|
@ -43,6 +44,8 @@ namespace GtkSharp.Generation {
|
|||
is_null_term = elem.GetAttributeAsBoolean ("null_term_array");
|
||||
is_array = elem.GetAttributeAsBoolean ("array") || elem.HasAttribute ("array_length_param");
|
||||
array_length_param = elem.GetAttribute ("array_length_param");
|
||||
if (elem.HasAttribute ("array_length_param_length"))
|
||||
array_length_param_index = int.Parse (elem.GetAttribute ("array_length_param_index"));
|
||||
elements_owned = elem.GetAttributeAsBoolean ("elements_owned");
|
||||
owned = elem.GetAttributeAsBoolean ("owned");
|
||||
ctype = elem.GetAttribute("type");
|
||||
|
@ -60,6 +63,10 @@ namespace GtkSharp.Generation {
|
|||
get { return array_length_param; }
|
||||
}
|
||||
|
||||
public int CountParameterIndex {
|
||||
get { return array_length_param_index; }
|
||||
}
|
||||
|
||||
public string CType {
|
||||
get {
|
||||
return ctype;
|
||||
|
|
Loading…
Reference in a new issue