[llvm-branch-commits] [lldb] release/22.x: [lldb] use the Py_REFCNT() macro instead of directly accessing member (#188161) (PR #188768)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 26 08:27:39 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: llvmbot
<details>
<summary>Changes</summary>
Backport 2a7b0f06d2060dbab8fa38fae7689f2d9048fa9d
Requested by: @<!-- -->JDevlieghere
---
Full diff: https://github.com/llvm/llvm-project/pull/188768.diff
1 Files Affected:
- (modified) lldb/bindings/python/python-wrapper.swig (+1-1)
``````````diff
diff --git a/lldb/bindings/python/python-wrapper.swig b/lldb/bindings/python/python-wrapper.swig
index bf59569920470..72f90f1b23c29 100644
--- a/lldb/bindings/python/python-wrapper.swig
+++ b/lldb/bindings/python/python-wrapper.swig
@@ -134,7 +134,7 @@ bool lldb_private::python::SWIGBridge::LLDBSwigPythonCallTypeScript(
#endif
) {
pfunc_impl = (PyObject *)(*pyfunct_wrapper);
- if (pfunc_impl->ob_refcnt == 1) {
+ if (Py_REFCNT(pfunc_impl) == 1) {
Py_XDECREF(pfunc_impl);
pfunc_impl = NULL;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/188768
More information about the llvm-branch-commits
mailing list