summaryrefslogtreecommitdiff
path: root/bindings/python/clang/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/python/clang/__init__.py')
-rw-r--r--bindings/python/clang/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bindings/python/clang/__init__.py b/bindings/python/clang/__init__.py
index 88f30812383f..fba49e38c9be 100644
--- a/bindings/python/clang/__init__.py
+++ b/bindings/python/clang/__init__.py
@@ -20,5 +20,13 @@ The available modules are:
Bindings for the Clang indexing library.
"""
+
+# Python 3 uses unicode for strings. The bindings, in particular the interaction
+# with ctypes, need modifying to handle conversions between unicode and
+# c-strings.
+import sys
+if sys.version_info[0] != 2:
+ raise Exception("Only Python 2 is supported.")
+
__all__ = ['cindex']