Update library

This commit is contained in:
Deukhoofd 2019-09-07 15:48:24 +02:00
parent b1958593ec
commit 7769722c08
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ namespace PorygonSharp.UserData
{
if (UserDataLookup.ContainsKey(type))
return;
RegisterUserDataType(hash);
RegisterUserDataType(name);
var ud = new UserData(hash, type);
UserDataLookup.TryAdd(type, ud);
ReverseLookup.TryAdd(hash, ud);
@ -55,7 +55,7 @@ namespace PorygonSharp.UserData
{
if (UserDataLookup.ContainsKey(type))
return;
RegisterUserDataType(hash);
RegisterUserDataType(name);
var ud = new UserData(hash, type);
UserDataLookup.TryAdd(type, ud);
ReverseLookup.TryAdd(hash, ud);
@ -136,7 +136,7 @@ namespace PorygonSharp.UserData
}
[DllImport("PorygonLang", EntryPoint = "RegisterUserDataType", CallingConvention = CallingConvention.Cdecl)]
private static extern void RegisterUserDataType(uint hashId);
private static extern void RegisterUserDataType([MarshalAs(UnmanagedType.LPWStr)]string name);
[DllImport("PorygonLang", EntryPoint = "GetUserDataFieldCount", CallingConvention = CallingConvention.Cdecl)]
private static extern int GetUserDataFieldCount(uint hashId);

Binary file not shown.