Mercurial > pub > dyncall > bindings
comparison python/pydc/README.txt @ 46:c21d1c2c84e1
- removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
* implies renaming pydcext.* to pydc.*
* while at it, iterate directly over args that are passed in (before we did extract fptr, sig and a tuple for the args and iterated over latter afterwards); we might have a tiny perf improvement now
- added type stub as package_data
author | Tassilo Philipp |
---|---|
date | Fri, 13 Nov 2020 14:10:31 +0100 |
parents | 0f86a5ecfe61 |
children | edf5c85de5ac |
comparison
equal
deleted
inserted
replaced
45:da553362fa7c | 46:c21d1c2c84e1 |
---|---|
10 Apr 11, 2020: support for getting loaded library path | 10 Apr 11, 2020: support for getting loaded library path |
11 Apr 12, 2020: breaking change: restrict 'Z' conversions to immutable types | 11 Apr 12, 2020: breaking change: restrict 'Z' conversions to immutable types |
12 and 'p' to mutable types (and handles) | 12 and 'p' to mutable types (and handles) |
13 Apr 13, 2020: added signature char support to specify calling conventions | 13 Apr 13, 2020: added signature char support to specify calling conventions |
14 Oct 27, 2020: allowing 'None' for 'p' params, always passing NULL | 14 Oct 27, 2020: allowing 'None' for 'p' params, always passing NULL |
15 Nov 13, 2020: removed pydc.py wrapper overhead (which only called pydcext.so | |
16 functions; implies renaming pydcext.* to pydc.*), added type stub | |
17 as package_data | |
15 | 18 |
16 | 19 |
17 BUILD/INSTALLATION | 20 BUILD/INSTALLATION |
18 ================== | 21 ================== |
19 | 22 |
28 | 31 |
29 | 32 |
30 API | 33 API |
31 === | 34 === |
32 | 35 |
36 In a nutshell: | |
37 | |
33 libhandle = load(libpath) # if path == None => handle to running process | 38 libhandle = load(libpath) # if path == None => handle to running process |
34 libpath = get_path(libhandle) # if handle == None => path to executable | 39 libpath = get_path(libhandle) # if handle == None => path to executable |
35 funcptr = find(libhandle, symbolname) | 40 funcptr = find(libhandle, symbolname) |
36 call(funcptr, signature, ...) | 41 call(funcptr, signature, ...) |
37 free(libhandle) | 42 free(libhandle) |
38 | 43 |
39 Note that there are no functions to set the calling convention mode. However, | 44 Notes: |
40 it can be set using the signature. | 45 - a pydc.pyi stub file with the precise interface description is available |
41 Not specifying any calling convention in the signature string will use the | 46 - there are no functions to set the calling convention mode, however, it can be |
42 platform's default one. | 47 set using the signature |
48 - not specifying any calling convention in the signature string will use the | |
49 platform's default one | |
43 | 50 |
44 | 51 |
45 SIGNATURE FORMAT | 52 SIGNATURE FORMAT |
46 ================ | 53 ================ |
47 | 54 |