generator: fixed string[] return types
This commit is contained in:
parent
8d4ec22ef2
commit
b5806d2a1b
2 changed files with 7 additions and 2 deletions
|
@ -160,7 +160,7 @@ namespace GtkSharp.Generation {
|
|||
string args = ", typeof (" + ElementType + "), " + (owned ? "true" : "false") + ", " + (elements_owned ? "true" : "false");
|
||||
var = "new " + IGen.QualifiedName + "(" + var + args + ")";
|
||||
} else if (is_null_term)
|
||||
return String.Format ("GLib.Marshaller.StringArrayToNullTermPointer ({0})", var);
|
||||
return String.Format ("GLib.Marshaller.StringArrayToNullTermStrvPointer ({0})", var);
|
||||
else if (is_array)
|
||||
return String.Format ("GLib.Marshaller.ArrayToArrayPtr ({0})", var);
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ namespace GLib {
|
|||
return ret.Replace ("%", "%%");
|
||||
}
|
||||
|
||||
internal static IntPtr StringArrayToStrvPtr (string[] strs)
|
||||
public static IntPtr StringArrayToStrvPtr (string[] strs)
|
||||
{
|
||||
IntPtr[] ptrs = StringArrayToNullTermPointer (strs);
|
||||
IntPtr ret = g_malloc (new UIntPtr ((ulong) (ptrs.Length * IntPtr.Size)));
|
||||
|
@ -178,6 +178,11 @@ namespace GLib {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static IntPtr StringArrayToNullTermStrvPointer (string[] strs)
|
||||
{
|
||||
return StringArrayToStrvPtr (strs);
|
||||
}
|
||||
|
||||
public static IntPtr[] StringArrayToNullTermPointer (string[] strs)
|
||||
{
|
||||
if (strs == null)
|
||||
|
|
Loading…
Reference in a new issue