Patch fixing crash in python bindings attached.
--
>From 12b1dac1e1aa7d572e2277769f7199de40594147 Mon Sep 17 00:00:00 2001
From: Anders Waldenborg <[email protected]>
Date: Fri, 7 Oct 2011 10:05:49 +0200
Subject: [PATCH 1/4] [PYTHON] Add xdata field to Cursor structures.
This new field was introduced in clang-c in r141277
Python needs this in its structure definition so it allocates enough
memory.
---
bindings/python/clang/cindex.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py
index 35c423d..5ea3714 100644
--- a/bindings/python/clang/cindex.py
+++ b/bindings/python/clang/cindex.py
@@ -815,7 +815,7 @@ class Cursor(Structure):
The Cursor class represents a reference to an element within the AST. It
acts as a kind of iterator.
"""
- _fields_ = [("_kind_id", c_int), ("data", c_void_p * 3)]
+ _fields_ = [("_kind_id", c_int), ("xdata", c_int), ("data", c_void_p * 3)]
def __eq__(self, other):
return Cursor_eq(self, other)
--
1.7.2.5
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits