public virtual unsafe void Init(FuseOpt *opt, void *data, int offset) { opt->offset = (ulong)offset; opt->templ = Marshal.StringToHGlobalAnsi(Template); Trace.WriteLine($"OptionInfo.Init: offset={offset}, templ={Template}@{opt->templ}"); }
public override unsafe void Init(FuseOpt *opt, void *data, int offset) { base.Init(opt, data, offset); opt->value = _value; *(int *)((byte *)data + offset) = _initialValue; }
public override unsafe void Init(FuseOpt *opt, void *data, int offset) { base.Init(opt, data, offset); opt->value = 0; *(IntPtr *)((byte *)data + offset) = IntPtr.Zero; }
public override unsafe void Process(FuseOpt *opt, void *data) { var value = *(int *)((byte *)data + opt->offset); if (value != 0) { _action(value); } }
public override unsafe void Process(FuseOpt *opt, void *data) { var ptr = *(IntPtr *)((byte *)data + opt->offset); if (ptr != IntPtr.Zero) { var str = Marshal.PtrToStringAnsi(ptr); _action(str); } }
public override unsafe void Release(FuseOpt *opt, void *data) { var ptr = *(IntPtr *)((byte *)data + opt->offset); if (ptr != IntPtr.Zero) { Marshal.FreeHGlobal(ptr); } base.Release(opt, data); }
internal static extern unsafe int FuseOptParse(FuseArgs *args, void *data, FuseOpt *opts, FuseOptProc proc);
public virtual unsafe void Release(FuseOpt *opt, void *data) { Marshal.FreeHGlobal(opt->templ); Trace.WriteLine($"OptionInfo.Release: templ@{opt->templ}"); }
public abstract unsafe void Process(FuseOpt *opt, void *data);