annotate python/pydc/README.txt @ 0:0cfcc391201f

initial from svn dyncall-1745
author Daniel Adler
date Thu, 19 Mar 2015 22:26:28 +0100
parents
children 4c5019f00f5b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 dyncall python bindings
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2 (C) 2007 Daniel Adler.
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 2007 04. December
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 API
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 libhandle = load(libpath)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8 funcptr = find(libhandle, symbolname )
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
9 call( funcptr,signature, ... )
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11 SIGNATURE FORMAT
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 is a formated string
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15 format: "xxxxx)y"
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 x is positional parameter-type charcode
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 'b' C++: bool <- Python: PyBool
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 'i' C: int <- Python: PyInt
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 'l' C: long long <- Python: PyLongLong
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 'p' C: void* <- Python: PyCObject
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23 's' C: const char* <- Python: PyString
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25 y is result-type charcode
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27 'v' void
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 'i' int -> PyInt
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29 'l' long -> PyLong
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 'p' ptr -> PyCObject encapsulating a void*
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31 'f' float -> PyFloat (upcast to double)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 'd' double -> PyFloat
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34 BUGS
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36 * build on osx/ppc - link error i386 something... [MacPython 2.4]
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
38 solution:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
39 installation of latest pytho for os x (MacPython 2.5)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
40
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
41 build log:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43 python setup.py install
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44 running install
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 running build
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46 running build_py
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47 creating build
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48 creating build/lib.macosx-10.3-fat-2.4
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
49 copying pydc.py -> build/lib.macosx-10.3-fat-2.4
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
50 running build_ext
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
51 building 'pydcext' extension
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
52 creating build/temp.macosx-10.3-fat-2.4
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
53 gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -I../../../dyncall -I../../../dynload -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c pydcext.c -o build/temp.macosx-10.3-fat-2.4/pydcext.o
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
54 gcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-fat-2.4/pydcext.o -L../../../dyncall -L../../../dynload -ldyncall_s -ldynload_s -lstdc++ -o build/lib.macosx-10.3-fat-2.4/pydcext.so
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
55 /usr/bin/ld: for architecture i386
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
56 /usr/bin/ld: warning ../../../dyncall/libdyncall_s.a archive's cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (can't load from it)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
57 /usr/bin/ld: warning ../../../dynload/libdynload_s.a archive's cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (can't load from it)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
58 running install_lib
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
59 copying build/lib.macosx-10.3-fat-2.4/pydcext.so -> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
60