diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index e0f4254a3de..ace690660be 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -7524,7 +7524,7 @@ def generate_evaluation_code(self, code): # For the fairly plausible special case where item is a temporary # with a refcount of 1 (so created specifically for us), # avoid making a copy - code.putln("#if CYTHON_COMPILING_IN_CPYTHON") + code.putln("#if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_USING_HPY") code.putln("if (Py_REFCNT(%s) == 1) {" % item.py_result()) code.putln("%s = %s;" % (self.result(), item.py_result())) item.generate_post_assignment_code(code) diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index d10ccfbd9d2..1d81af50456 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -422,9 +422,6 @@ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif - #ifndef CYTHON_USE_FREELISTS - #define CYTHON_USE_FREELISTS 1 - #endif #endif #if defined(HPY)