Commit 31b7fc8e authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Backwards-compatability pxd files for CPython API

parent 19fa9fbf
# Present for backwards compatability
from cpython.bool cimport *
# Present for backwards compatability
from cpython.buffer cimport *
# Present for backwards compatability
from cpython.bytes cimport *
# Present for backwards compatability
from cpython.cobject cimport *
# Present for backwards compatability
from cpython.complex cimport *
# Present for backwards compatability
from cpython.dict cimport *
# Present for backwards compatability
from cpython.exc cimport *
# Present for backwards compatability
from cpython.float cimport *
# Present for backwards compatability
from cpython.function cimport *
# Present for backwards compatability
from cpython.getargs cimport *
# Present for backwards compatability
from cpython.instance cimport *
# Present for backwards compatability
from cpython.int cimport *
# Present for backwards compatability
from cpython.iterator cimport *
# Present for backwards compatability
from cpython.list cimport *
# Present for backwards compatability
from cpython.long cimport *
# Present for backwards compatability
from cpython.mapping cimport *
# Present for backwards compatability
from cpython.mem cimport *
# Present for backwards compatability
from cpython.method cimport *
# Present for backwards compatability
from cpython.module cimport *
# Present for backwards compatability
from cpython.number cimport *
# Present for backwards compatability
from cpython.object cimport *
# Present for backwards compatability
from cpython.oldbuffer cimport *
# Present for backwards compatability
from cpython.pycapsule cimport *
# Present for backwards compatability
from cpython.ref cimport *
# Present for backwards compatability
from cpython.sequence cimport *
# Present for backwards compatability
from cpython.set cimport *
# Present for backwards compatability
from cpython.string cimport *
# Present for backwards compatability
from cpython.tuple cimport *
# Present for backwards compatability
from cpython.type cimport *
# Present for backwards compatability
from cpython.unicode cimport *
# Present for backwards compatability
from cpython.version cimport *
# Present for backwards compatability
from cpython.weakref cimport *
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([])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment