Backwards-compatability pxd files for CPython API
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Fri, 12 Mar 2010 11:48:09 +0000 (12:48 +0100)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Fri, 12 Mar 2010 11:48:09 +0000 (12:48 +0100)
33 files changed:
Cython/Includes/python_bool.pxd [new file with mode: 0644]
Cython/Includes/python_buffer.pxd [new file with mode: 0644]
Cython/Includes/python_bytes.pxd [new file with mode: 0644]
Cython/Includes/python_cobject.pxd [new file with mode: 0644]
Cython/Includes/python_complex.pxd [new file with mode: 0644]
Cython/Includes/python_dict.pxd [new file with mode: 0644]
Cython/Includes/python_exc.pxd [new file with mode: 0644]
Cython/Includes/python_float.pxd [new file with mode: 0644]
Cython/Includes/python_function.pxd [new file with mode: 0644]
Cython/Includes/python_getargs.pxd [new file with mode: 0644]
Cython/Includes/python_instance.pxd [new file with mode: 0644]
Cython/Includes/python_int.pxd [new file with mode: 0644]
Cython/Includes/python_iterator.pxd [new file with mode: 0644]
Cython/Includes/python_list.pxd [new file with mode: 0644]
Cython/Includes/python_long.pxd [new file with mode: 0644]
Cython/Includes/python_mapping.pxd [new file with mode: 0644]
Cython/Includes/python_mem.pxd [new file with mode: 0644]
Cython/Includes/python_method.pxd [new file with mode: 0644]
Cython/Includes/python_module.pxd [new file with mode: 0644]
Cython/Includes/python_number.pxd [new file with mode: 0644]
Cython/Includes/python_object.pxd [new file with mode: 0644]
Cython/Includes/python_oldbuffer.pxd [new file with mode: 0644]
Cython/Includes/python_pycapsule.pxd [new file with mode: 0644]
Cython/Includes/python_ref.pxd [new file with mode: 0644]
Cython/Includes/python_sequence.pxd [new file with mode: 0644]
Cython/Includes/python_set.pxd [new file with mode: 0644]
Cython/Includes/python_string.pxd [new file with mode: 0644]
Cython/Includes/python_tuple.pxd [new file with mode: 0644]
Cython/Includes/python_type.pxd [new file with mode: 0644]
Cython/Includes/python_unicode.pxd [new file with mode: 0644]
Cython/Includes/python_version.pxd [new file with mode: 0644]
Cython/Includes/python_weakref.pxd [new file with mode: 0644]
tests/run/cython_includes.pyx

diff --git a/Cython/Includes/python_bool.pxd b/Cython/Includes/python_bool.pxd
new file mode 100644 (file)
index 0000000..2bf64ce
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.bool cimport *
diff --git a/Cython/Includes/python_buffer.pxd b/Cython/Includes/python_buffer.pxd
new file mode 100644 (file)
index 0000000..6329e36
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.buffer cimport *
diff --git a/Cython/Includes/python_bytes.pxd b/Cython/Includes/python_bytes.pxd
new file mode 100644 (file)
index 0000000..7cfa1c2
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.bytes cimport *
diff --git a/Cython/Includes/python_cobject.pxd b/Cython/Includes/python_cobject.pxd
new file mode 100644 (file)
index 0000000..537e7ca
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.cobject cimport *
diff --git a/Cython/Includes/python_complex.pxd b/Cython/Includes/python_complex.pxd
new file mode 100644 (file)
index 0000000..87f99d2
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.complex cimport *
diff --git a/Cython/Includes/python_dict.pxd b/Cython/Includes/python_dict.pxd
new file mode 100644 (file)
index 0000000..5ad9117
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.dict cimport *
diff --git a/Cython/Includes/python_exc.pxd b/Cython/Includes/python_exc.pxd
new file mode 100644 (file)
index 0000000..883c4cf
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.exc cimport *
diff --git a/Cython/Includes/python_float.pxd b/Cython/Includes/python_float.pxd
new file mode 100644 (file)
index 0000000..494920f
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.float cimport *
diff --git a/Cython/Includes/python_function.pxd b/Cython/Includes/python_function.pxd
new file mode 100644 (file)
index 0000000..bde3fa9
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.function cimport *
diff --git a/Cython/Includes/python_getargs.pxd b/Cython/Includes/python_getargs.pxd
new file mode 100644 (file)
index 0000000..dcf25b7
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.getargs cimport *
diff --git a/Cython/Includes/python_instance.pxd b/Cython/Includes/python_instance.pxd
new file mode 100644 (file)
index 0000000..7d57409
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.instance cimport *
diff --git a/Cython/Includes/python_int.pxd b/Cython/Includes/python_int.pxd
new file mode 100644 (file)
index 0000000..11bc26b
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.int cimport *
diff --git a/Cython/Includes/python_iterator.pxd b/Cython/Includes/python_iterator.pxd
new file mode 100644 (file)
index 0000000..e7691f4
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.iterator cimport *
diff --git a/Cython/Includes/python_list.pxd b/Cython/Includes/python_list.pxd
new file mode 100644 (file)
index 0000000..53f594e
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.list cimport *
diff --git a/Cython/Includes/python_long.pxd b/Cython/Includes/python_long.pxd
new file mode 100644 (file)
index 0000000..4bdf629
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.long cimport *
diff --git a/Cython/Includes/python_mapping.pxd b/Cython/Includes/python_mapping.pxd
new file mode 100644 (file)
index 0000000..6127601
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.mapping cimport *
diff --git a/Cython/Includes/python_mem.pxd b/Cython/Includes/python_mem.pxd
new file mode 100644 (file)
index 0000000..9729cd8
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.mem cimport *
diff --git a/Cython/Includes/python_method.pxd b/Cython/Includes/python_method.pxd
new file mode 100644 (file)
index 0000000..36c67e1
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.method cimport *
diff --git a/Cython/Includes/python_module.pxd b/Cython/Includes/python_module.pxd
new file mode 100644 (file)
index 0000000..5a46259
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.module cimport *
diff --git a/Cython/Includes/python_number.pxd b/Cython/Includes/python_number.pxd
new file mode 100644 (file)
index 0000000..7b544ff
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.number cimport *
diff --git a/Cython/Includes/python_object.pxd b/Cython/Includes/python_object.pxd
new file mode 100644 (file)
index 0000000..dd8bff1
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.object cimport *
diff --git a/Cython/Includes/python_oldbuffer.pxd b/Cython/Includes/python_oldbuffer.pxd
new file mode 100644 (file)
index 0000000..d4bb2dc
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.oldbuffer cimport *
diff --git a/Cython/Includes/python_pycapsule.pxd b/Cython/Includes/python_pycapsule.pxd
new file mode 100644 (file)
index 0000000..a6f6543
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.pycapsule cimport *
diff --git a/Cython/Includes/python_ref.pxd b/Cython/Includes/python_ref.pxd
new file mode 100644 (file)
index 0000000..fc1783d
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.ref cimport *
diff --git a/Cython/Includes/python_sequence.pxd b/Cython/Includes/python_sequence.pxd
new file mode 100644 (file)
index 0000000..b73fa47
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.sequence cimport *
diff --git a/Cython/Includes/python_set.pxd b/Cython/Includes/python_set.pxd
new file mode 100644 (file)
index 0000000..96a4780
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.set cimport *
diff --git a/Cython/Includes/python_string.pxd b/Cython/Includes/python_string.pxd
new file mode 100644 (file)
index 0000000..df4fd4f
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.string cimport *
diff --git a/Cython/Includes/python_tuple.pxd b/Cython/Includes/python_tuple.pxd
new file mode 100644 (file)
index 0000000..2362c09
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.tuple cimport *
diff --git a/Cython/Includes/python_type.pxd b/Cython/Includes/python_type.pxd
new file mode 100644 (file)
index 0000000..b1c4d1c
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.type cimport *
diff --git a/Cython/Includes/python_unicode.pxd b/Cython/Includes/python_unicode.pxd
new file mode 100644 (file)
index 0000000..88fc5af
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.unicode cimport *
diff --git a/Cython/Includes/python_version.pxd b/Cython/Includes/python_version.pxd
new file mode 100644 (file)
index 0000000..93aa7f3
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.version cimport *
diff --git a/Cython/Includes/python_weakref.pxd b/Cython/Includes/python_weakref.pxd
new file mode 100644 (file)
index 0000000..2337d09
--- /dev/null
@@ -0,0 +1,2 @@
+# Present for backwards compatability
+from cpython.weakref cimport *
index 526d539208f1bb10edb85eb2fdad65f6c0cdd811..ddaec586942cc349f228eaee90a388922dea9c32 100644 (file)
@@ -1,20 +1,23 @@
 
 from libc.stdio cimport sprintf
 from python cimport PyType_Check
-from cpython.type cimport PyType_Check as PyType_Check2
+from python_type cimport PyType_Check as PyType_Check2
+from cpython.type cimport PyType_Check as PyType_Check3
 
-def libc_imports():
+def libc_cimports():
     """
-    >>> libc_imports()
+    >>> libc_cimports()
     hello
     """
     cdef char buf[10]
     sprintf(buf, b'hello')
     print (<object>buf).decode('ASCII')
 
-def python_imports():
+def cpython_cimports():
     """
-    >>> python_imports()
+    >>> cpython_cimports()
+    True
+    False
     True
     False
     True
@@ -24,4 +27,6 @@ def python_imports():
     print PyType_Check([])
     print PyType_Check2(list)
     print PyType_Check2([])
+    print PyType_Check3(list)
+    print PyType_Check3([])