comparison python/pydc/README.txt @ 28:edbbd467f50a

python binding: - update to dyncall 1.1 - Python 3 support (supports both, Python 2 and 3) - using the Capsule API over PyCObject, when available - support for python unicode strings (for both, Python 2 and 3) - doc cleanup ruby binding: - doc cleanup
author Tassilo Philipp
date Tue, 07 Apr 2020 21:16:37 +0200
parents 681db37a300c
children 6cc2b7fc7ea2
comparison
equal deleted inserted replaced
27:18e1f1bb1945 28:edbbd467f50a
1 dyncall python bindings 1 dyncall python bindings
2 (C) 2007-2016 Daniel Adler 2 Copyright 2007-2016 Daniel Adler
3 Dec 4, 2007: initial 3 2018-2020 Tassilo Philipp
4 Mar 22,2016: update to dyncall 0.9, includes breaking sig char changes 4
5 Apr 19,2018: update to dyncall 1.0 5 Dec 4, 2007: initial
6 Mar 22, 2016: update to dyncall 0.9, includes breaking sig char changes
7 Apr 19, 2018: update to dyncall 1.0
8 Apr 7, 2020: update to dyncall 1.1, Python 3 support, using the Capsule
9 API, as well as support for python unicode strings
6 10
7 11
8 BUILD/INSTALLATION 12 BUILD/INSTALLATION
9 ================== 13 ==================
10 14
13 17
14 2) Build and install this extension with: 18 2) Build and install this extension with:
15 19
16 python setup.py install 20 python setup.py install
17 21
18 Building an egg isn't supported, currently. 22 Building a wheel package isn't supported, currently.
19 23
20 24
21 API 25 API
22 === 26 ===
23 27
33 37
34 format: "xxxxx)y" 38 format: "xxxxx)y"
35 39
36 x is positional parameter-type charcode, y is result-type charcode 40 x is positional parameter-type charcode, y is result-type charcode
37 41
38 SIG | FROM PYTHON | C/C++ | TO PYTHON 42 SIG | FROM PYTHON 2 | FROM PYTHON 3 @@@ | C/C++ | TO PYTHON 2 | TO PYTHON 3 @@@
39 ----+------------------------------------+--------------------+----------------------------------- 43 ----+------------------------------------+------------------------------------+---------------------------------+------------------------------------+-----------------------------------
40 'v' | | void | 44 'v' | | | void | |
41 'B' | PyBool | bool | PyBool 45 'B' | PyBool | PyBool | bool | PyBool | PyBool
42 'c' | PyInt (range checked) | char | PyInt 46 'c' | PyInt (range checked) | PyInt (range checked) | char | PyInt | PyInt
43 'C' | PyInt (range checked) | unsigned char | PyInt 47 'C' | PyInt (range checked) | PyInt (range checked) | unsigned char | PyInt | PyInt
44 's' | PyInt (range checked) | short | PyInt 48 's' | PyInt (range checked) | PyInt (range checked) | short | PyInt | PyInt
45 'S' | PyInt (range checked) | unsigned short | PyInt 49 'S' | PyInt (range checked) | PyInt (range checked) | unsigned short | PyInt | PyInt
46 'i' | PyInt | int | PyInt 50 'i' | PyInt | PyInt | int | PyInt | PyInt
47 'I' | PyInt | unsigned int | PyInt 51 'I' | PyInt | PyInt | unsigned int | PyInt | PyInt
48 'j' | PyLong | long | PyLong 52 'j' | PyLong | PyLong | long | PyLong | PyLong
49 'J' | PyLong | unsigned long | PyLong 53 'J' | PyLong | PyLong | unsigned long | PyLong | PyLong
50 'l' | PyLongLong | long long | PyLongLong 54 'l' | PyLongLong | PyLongLong | long long | PyLongLong | PyLongLong
51 'L' | PyLongLong | unsigned long long | PyLongLong 55 'L' | PyLongLong | PyLongLong | unsigned long long | PyLongLong | PyLongLong
52 'f' | PyFloat (cast to single precision) | float | PyFloat (cast to double precision) 56 'f' | PyFloat (cast to single precision) | PyFloat (cast to single precision) | float | PyFloat (cast to double precision) | PyFloat (cast to double precision)
53 'd' | PyFloat | double | PyFloat 57 'd' | PyFloat | PyFloat | double | PyFloat | PyFloat
54 'p' | PyCObject | void* | PyCObject encapsulating a void* 58 'p' | PyUnicode/PyString/PyLong | PyUnicode/PyBytes/PyLong | void* | Py_ssize_t | Py_ssize_t
55 'Z' | PyString | const char* | PyString 59 'Z' | PyUnicode/PyString | PyUnicode/PyBytes | const char* (UTF-8 for unicode) | PyString | PyUnicode
56 60
57 61
58 TODO 62 TODO
59 ==== 63 ====
60 64
61 - support signature suffixes used to indicate calling conventions, are not supported yet! 65 - signature suffixes used to indicate calling conventions are not supported yet!
62 - not sure if returning 'p' is working, creating PyCObject, check and write test code 66 - not sure if returning 'p' is working, creating PyCObject, check and write test code @@@
67 - callback support
63 68
64 69
65 BUGS 70 BUGS
66 ==== 71 ====
67 72
68 * build on osx/ppc - link error i386 something... [MacPython 2.4] 73 * build on osx/ppc - link error i386 something... [MacPython 2.4]
69 74
70 solution: 75 solution:
71 installation of latest python for os x (MacPython 2.5) 76 installation of latest python for os x (MacPython 2.5)
72 77
73 build log:
74 78
75 python setup.py install 79 EXAMPLE BUILD
80 =============
81
82 $ python setup.py install
76 running install 83 running install
77 running build 84 running build
78 running build_py 85 running build_py
79 creating build 86 creating build
80 creating build/lib.macosx-10.3-fat-2.4 87 creating build/lib.macosx-10.3-fat-2.4