This is an automated email from the ASF dual-hosted git repository.

tvb 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 <[email protected]>
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)
 

Reply via email to