+
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/Libs/GObject-2.0/Public/Value.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using GLib.Internal;
using GObject.Internal;
Expand Down Expand Up @@ -37,10 +38,10 @@ public Value(Enum value) : this(HasFlags(value) ? Type.Flags : Type.Enum)

private static bool HasFlags(Enum e) => e.GetType().IsDefined(typeof(FlagsAttribute), false);

private nuint GetTypeValue()
private unsafe nuint GetTypeValue()
{
var structure = Marshal.PtrToStructure<ValueData>(Handle.DangerousGetHandle());
return structure.GType;
//The first element of the structure the pointer points to is the gtype of the value
return Unsafe.AsRef<nuint>((void*) Handle.DangerousGetHandle());
}

/// <summary>
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载