python: fix debug() for Cython
diff --git a/bindings/python/capstone/capstone.py b/bindings/python/capstone/capstone.py
index 32033d8..70740de 100644
--- a/bindings/python/capstone/capstone.py
+++ b/bindings/python/capstone/capstone.py
@@ -651,6 +651,14 @@
 
 # print out debugging info
 def debug():
+    # is Cython there?
+    try:
+        import ccapstone
+        return ccapstone.debug()
+    except:
+        # no Cython, fallback to Python code below
+        pass
+
     # Tricky: make a dummy call to cs_open() to initialize internal data.
     # FIXME: core need to be fixed to avoid this.
     try:
diff --git a/bindings/python/pyx/ccapstone.pyx b/bindings/python/pyx/ccapstone.pyx
index ca709a9..b137f57 100644
--- a/bindings/python/pyx/ccapstone.pyx
+++ b/bindings/python/pyx/ccapstone.pyx
@@ -263,11 +263,11 @@
 
 
 # print out debugging info
-cdef debug():
+def debug():
     # Tricky: make a dummy call to cs_open() to initialize internal data.
     # FIXME: core need to be fixed to avoid this.
     cdef cc.csh tmp
-    cc.cs_open(capstone.CS_ARCH_ALL, capstone.CS_ARM, &tmp)
+    cc.cs_open(capstone.CS_ARCH_ALL, capstone.CS_MODE_ARM, &tmp)
 
     if cc.cs_support(capstone.CS_SUPPORT_DIET):
         diet = "diet"