/* * This macro defines a special constructor for GElement descendants. * The reason this is done is that we need to drop ownership of such * classes if they are given a containing GElement in their constructors. * If this isn't done, the objects would get destroyed twice -- first by * their containers and then by SWIG. */ %define DISOWN(CLASS) %pythonappend Amanith::CLASS::CLASS "if len(args) and isinstance(args[0], GElement): self.thisown = 0" %enddef DISOWN(GElement) DISOWN(GKernel) DISOWN(GCurve1D) DISOWN(GCurve2D) DISOWN(GFont2D) DISOWN(GPixelMap) DISOWN(GAnimElement) DISOWN(GImpExp)