https://github.com/Endilll updated 
https://github.com/llvm/llvm-project/pull/140499

>From 445eacab8a326d3abcca95a31f07c272d0d155e7 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov <serebrennikov.vladis...@gmail.com>
Date: Mon, 19 May 2025 09:24:36 +0300
Subject: [PATCH 1/2] [libclang/python][NFC] Explain how null cursors are
 handled in documentation

---
 clang/bindings/python/clang/cindex.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/clang/bindings/python/clang/cindex.py 
b/clang/bindings/python/clang/cindex.py
index f65bcad780a70..82a6197bf61af 100644
--- a/clang/bindings/python/clang/cindex.py
+++ b/clang/bindings/python/clang/cindex.py
@@ -1585,6 +1585,8 @@ class Cursor(Structure):
     """
     The Cursor class represents a reference to an element within the AST. It
     acts as a kind of iterator.
+
+    Methods of this class return null cursors as None.
     """
 
     _fields_ = [("_kind_id", c_int), ("xdata", c_int), ("data", c_void_p * 3)]

>From 9934b0b2b041b1374a459e395c80577b32556626 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov <serebrennikov.vladis...@gmail.com>
Date: Mon, 19 May 2025 10:09:18 +0300
Subject: [PATCH 2/2] We don't need to be as specific

---
 clang/bindings/python/clang/cindex.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/bindings/python/clang/cindex.py 
b/clang/bindings/python/clang/cindex.py
index 82a6197bf61af..6f7243cdf80ac 100644
--- a/clang/bindings/python/clang/cindex.py
+++ b/clang/bindings/python/clang/cindex.py
@@ -1586,7 +1586,7 @@ class Cursor(Structure):
     The Cursor class represents a reference to an element within the AST. It
     acts as a kind of iterator.
 
-    Methods of this class return null cursors as None.
+    Null cursors are mapped to None.
     """
 
     _fields_ = [("_kind_id", c_int), ("xdata", c_int), ("data", c_void_p * 3)]

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to