mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
generator: fixed string[] return types
This commit is contained in:
parent
8d4ec22ef2
commit
b5806d2a1b
@ -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 New Issue
Block a user