summaryrefslogtreecommitdiffstats
path: root/libdimension-python
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension-python')
-rw-r--r--libdimension-python/dimension.pxd3
-rw-r--r--libdimension-python/dimension.pyx9
2 files changed, 2 insertions, 10 deletions
diff --git a/libdimension-python/dimension.pxd b/libdimension-python/dimension.pxd
index 55d47ab..61b5060 100644
--- a/libdimension-python/dimension.pxd
+++ b/libdimension-python/dimension.pxd
@@ -317,8 +317,7 @@ cdef extern from "../libdimension/dimension.h":
ctypedef struct dmnsn_interior:
double ior
- dmnsn_interior *dmnsn_new_interior()
- void dmnsn_delete_interior(dmnsn_interior *interior)
+ dmnsn_interior *dmnsn_new_interior(dmnsn_pool *pool)
###########
# Objects #
diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx
index da45f32..7466b9e 100644
--- a/libdimension-python/dimension.pyx
+++ b/libdimension-python/dimension.pyx
@@ -1045,12 +1045,9 @@ cdef class Interior:
Keyword arguments:
ior -- index of reflection
"""
- self._interior = dmnsn_new_interior()
+ self._interior = dmnsn_new_interior(_get_pool())
self._interior.ior = ior
- def __dealloc__(self):
- dmnsn_delete_interior(self._interior)
-
property ior:
"""Index of reflection."""
def __get__(self):
@@ -1062,7 +1059,6 @@ cdef Interior _Interior(dmnsn_interior *interior):
"""Wrap an Interior object around a dmnsn_interior *."""
cdef Interior self = Interior.__new__(Interior)
self._interior = interior
- DMNSN_INCREF(self._interior)
return self
###########
@@ -1134,7 +1130,6 @@ cdef class Object(_Transformable):
return _Interior(self._object.interior)
def __set__(self, Interior interior not None):
self._object.interior = interior._interior
- DMNSN_INCREF(self._object.interior)
def transform(self, Matrix trans not None):
"""Transform an object."""
@@ -1561,9 +1556,7 @@ cdef class Scene:
def __get__(self):
return _Interior(self._scene.default_interior)
def __set__(self, Interior interior not None):
- dmnsn_delete_interior(self._scene.default_interior)
self._scene.default_interior = interior._interior
- DMNSN_INCREF(self._scene.default_interior)
property background:
"""The background pigment of the scene (default: Black)."""