internal static IntPtr RestoreRuntimeData(RuntimeDataStorage storage)
{
PyCLRMetaType = storage.PopValue <IntPtr>();
_metaSlotsHodler = new SlotsHolder(PyCLRMetaType);
TypeManager.InitializeSlots(PyCLRMetaType, typeof(MetaType), _metaSlotsHodler);
IntPtr mdef = Marshal.ReadIntPtr(PyCLRMetaType, TypeOffset.tp_methods);
foreach (var methodName in CustomMethods)
{
var mi = typeof(MetaType).GetMethod(methodName);
ThunkInfo thunkInfo = Interop.GetThunk(mi, "BinaryFunc");
_metaSlotsHodler.KeeapAlive(thunkInfo);
mdef = TypeManager.WriteMethodDef(mdef, methodName, thunkInfo.Address);
}
return(PyCLRMetaType);
}