Mercurial > pub > dyncall > bindings
annotate shell/shdc/examples.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 | 1d50532dce12 |
children |
rev | line source |
---|---|
0 | 1 Call: |
2 ----- | |
40 | 3 |
4 $ ./shdc -c /usr/lib/libm.so sqrt 'd)d' 3 | |
0 | 5 1.73205 |
40 | 6 |
7 $ ./shdc -c /usr/lib/libm.so powf 'ff)f' 3 2.5 | |
0 | 8 15.5885 |
40 | 9 |
10 $ ./shdc -c /usr/lib/libc.so printf '_eZ_.Zi)v' 'Hi! Say hi to %s, l%ier!' 'Daniel' 8 | |
0 | 11 Hi! Say hi to Daniel, l8er! |
12 | |
40 | 13 $ # FreeBSD syscall where SYS_write == 4; return value from syscall is 18, with |
14 $ # write of string results in stdout output of "syscall write test18" | |
15 $ ./shdc -c "" 4 '_$iZi)i' 1 'syscall write test' 18 | |
16 syscall write test18 | |
17 | |
18 | |
0 | 19 List: |
20 ----- | |
21 $ ./shdc -l /usr/lib/libm.so | |
40 | 22 |