generator: fixed optional array parameters
This commit is contained in:
parent
5eea00f705
commit
c3f7b8e32b
1 changed files with 3 additions and 1 deletions
|
@ -149,7 +149,9 @@ namespace GtkSharp.Generation {
|
||||||
|
|
||||||
result [i] = p.PassAs != "" ? p.PassAs + " " : "";
|
result [i] = p.PassAs != "" ? p.PassAs + " " : "";
|
||||||
if (p.IsOptional && p.PassAs == String.Empty) {
|
if (p.IsOptional && p.PassAs == String.Empty) {
|
||||||
if (p.Generatable is StructGen || p.Generatable is BoxedGen)
|
if (p.IsArray)
|
||||||
|
result [i++] += "null";
|
||||||
|
else if (p.Generatable is StructGen || p.Generatable is BoxedGen)
|
||||||
result [i++] += p.CSType + ".Zero";
|
result [i++] += p.CSType + ".Zero";
|
||||||
else if (p.CSType == "System.IntPtr")
|
else if (p.CSType == "System.IntPtr")
|
||||||
result [i++] += "System.IntPtr.Zero";
|
result [i++] += "System.IntPtr.Zero";
|
||||||
|
|
Loading…
Add table
Reference in a new issue