//==================================================================== // MethodBinding dealloc implementation. //==================================================================== public static new void tp_dealloc(IntPtr ob) { MethodBinding self = (MethodBinding)GetManagedObject(ob); Runtime.XDecref(self.target); Runtime.XDecref(self.targetType); ExtensionType.FinalizeObject(self); }
//==================================================================== // ConstructorBinding dealloc implementation. //==================================================================== public static new void tp_dealloc(IntPtr ob) { BoundContructor self = (BoundContructor)GetManagedObject(ob); Runtime.Decref(self.repr); Runtime.Decref(self.pyTypeHndl); ExtensionType.FinalizeObject(self); }
//==================================================================== // ConstructorBinding dealloc implementation. //==================================================================== public static new void tp_dealloc(IntPtr ob) { ConstructorBinding self = (ConstructorBinding)GetManagedObject(ob); Runtime.Decref(self.repr); Runtime.Decref(self.pyTypeHndl); ExtensionType.FinalizeObject(self); }
//==================================================================== // Descriptor dealloc implementation. //==================================================================== public static new void tp_dealloc(IntPtr ob) { EventObject self = (EventObject)GetManagedObject(ob); if (self.unbound != null) { Runtime.Decref(self.unbound.pyHandle); } ExtensionType.FinalizeObject(self); }
/// <summary> /// Descriptor dealloc implementation. /// </summary> public new static void tp_dealloc(IntPtr ob) { var self = (MethodObject)GetManagedObject(ob); Runtime.XDecref(self.doc); if (self.unbound != null) { Runtime.XDecref(self.unbound.pyHandle); } ExtensionType.FinalizeObject(self); }
public new static int tp_setattro(IntPtr ob, IntPtr key, IntPtr val) { var managedKey = Runtime.GetManagedString(key); if ((settableAttributes.Contains(managedKey)) || (ManagedType.GetManagedObject(val)?.GetType() == typeof(ModuleObject))) { var self = (ModuleObject)ManagedType.GetManagedObject(ob); return(Runtime.PyDict_SetItem(self.dict, key, val)); } return(ExtensionType.tp_setattro(ob, key, val)); }