You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:02:07 UTC
[buildstream] 17/27: _variables.pyx: Remove refcounting from
ObjectArray
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch tristan/partial-variables-manual-string-join
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 3889321a5b58fb3dffacff4f5cb41a3fd41674ba
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Fri Jul 3 17:12:36 2020 +0900
_variables.pyx: Remove refcounting from ObjectArray
---
src/buildstream/_variables.pyx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/buildstream/_variables.pyx b/src/buildstream/_variables.pyx
index c1d7b92..c2e0b29 100644
--- a/src/buildstream/_variables.pyx
+++ b/src/buildstream/_variables.pyx
@@ -774,7 +774,7 @@ cdef void object_array_append(ObjectArray *array, PyObject *obj):
if not array.array:
raise MemoryError()
- Py_XINCREF(obj)
+ # Py_XINCREF(obj)
array.array[array.length] = obj
array.length += 1
@@ -787,11 +787,10 @@ cdef void object_array_append(ObjectArray *array, PyObject *obj):
# array (ObjectArray *): The array to free up
#
cdef void object_array_free(ObjectArray *array):
- cdef Py_ssize_t idx = 0
- while idx < array.length:
- Py_XDECREF(array.array[idx])
- idx += 1
-
+ #cdef Py_ssize_t idx = 0
+ #while idx < array.length:
+ # Py_XDECREF(array.array[idx])
+ # idx += 1
if array._size > 0:
PyMem_Free(array.array)