Skip to content

Commit 739858f

Browse files
committed
Regenerate the parser bindings
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent b12acfc commit 739858f

File tree

13 files changed

+711
-229
lines changed

13 files changed

+711
-229
lines changed

src/CppParser/Bindings/CLI/Decl.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,17 +250,17 @@ namespace CppSharp
250250
public enum struct RecordArgABI
251251
{
252252
/// <summary>
253-
/// <para>Pass it using the normal C aggregate rules for the ABI,</para>
254-
/// <para>potentially introducing extra copies and passing some</para>
255-
/// <para>or all of it in registers.</para>
256-
/// </summary>
253+
/// <para>Pass it using the normal C aggregate rules for the ABI,</para>
254+
/// <para>potentially introducing extra copies and passing some</para>
255+
/// <para>or all of it in registers.</para>
256+
/// </summary>
257257
Default = 0,
258258
/// <summary>
259-
/// <para>Pass it on the stack using its defined layout.</para>
260-
/// <para>The argument must be evaluated directly into the correct</para>
261-
/// <para>stack position in the arguments area, and the call machinery</para>
262-
/// <para>must not move it or introduce extra copies.</para>
263-
/// </summary>
259+
/// <para>Pass it on the stack using its defined layout.</para>
260+
/// <para>The argument must be evaluated directly into the correct</para>
261+
/// <para>stack position in the arguments area, and the call machinery</para>
262+
/// <para>must not move it or introduce extra copies.</para>
263+
/// </summary>
264264
DirectInMemory = 1,
265265
/// <summary>Pass it as a pointer to temporary memory.</summary>
266266
Indirect = 2

src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs

Lines changed: 112 additions & 35 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ public unsafe partial struct __Internalc__N_std_N___1_S_basic_string__C___N_std_
713713
[SuppressUnmanagedCodeSecurity]
714714
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
715715
EntryPoint="_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc")]
716-
internal static extern global::System.IntPtr Assignc__N_std_N___1_S_basic_string__C___N_std_N___1_S_char_traits__C___N_std_N___1_S_allocator__C(global::System.IntPtr __instance, string __s);
716+
internal static extern global::System.IntPtr Assignc__N_std_N___1_S_basic_string__C___N_std_N___1_S_char_traits__C___N_std_N___1_S_allocator__C(global::System.IntPtr __instance, [MarshalAs(UnmanagedType.LPUTF8Str)] string __s);
717717

718718
[SuppressUnmanagedCodeSecurity]
719719
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,

src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs

Lines changed: 112 additions & 35 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ public partial struct __Internal
662662
[SuppressUnmanagedCodeSecurity]
663663
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
664664
EntryPoint="?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@QBD@Z")]
665-
internal static extern global::System.IntPtr Assign(global::System.IntPtr __instance, string _Ptr);
665+
internal static extern global::System.IntPtr Assign(global::System.IntPtr __instance, [MarshalAs(UnmanagedType.LPUTF8Str)] string _Ptr);
666666

667667
[SuppressUnmanagedCodeSecurity]
668668
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
@@ -686,7 +686,12 @@ public static string CStr(this global::Std.BasicString<sbyte, global::Std.CharTr
686686
{
687687
var __arg0 = ReferenceEquals(@this, null) ? global::System.IntPtr.Zero : @this.__Instance;
688688
var __ret = __Internal.CStr(__arg0);
689-
return Marshal.PtrToStringAnsi(__ret);
689+
if (__ret == global::System.IntPtr.Zero)
690+
return default(string);
691+
var __retPtr = (byte*) __ret;
692+
int __length = 0;
693+
while (*(__retPtr++) != 0) __length += sizeof(byte);
694+
return global::System.Text.Encoding.UTF8.GetString((byte*) __ret, __length);
690695
}
691696
}
692697
}

src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs

Lines changed: 112 additions & 35 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ public unsafe partial struct __Internalc__N_std_N___1_S_basic_string__C___N_std_
713713
[SuppressUnmanagedCodeSecurity]
714714
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
715715
EntryPoint="_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc")]
716-
internal static extern global::System.IntPtr Assignc__N_std_N___1_S_basic_string__C___N_std_N___1_S_char_traits__C___N_std_N___1_S_allocator__C(global::System.IntPtr __instance, string __s);
716+
internal static extern global::System.IntPtr Assignc__N_std_N___1_S_basic_string__C___N_std_N___1_S_char_traits__C___N_std_N___1_S_allocator__C(global::System.IntPtr __instance, [MarshalAs(UnmanagedType.LPUTF8Str)] string __s);
717717

718718
[SuppressUnmanagedCodeSecurity]
719719
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,

0 commit comments

Comments
 (0)