annotate ruby/rbdc/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 3745790db233
children b6114d9a9a98
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 ruby bindings
25
02a455de2b40 - 1.0 updates
Tassilo Philipp
parents: 17
diff changeset
2 Copyright 2007-2018 Tassilo Philipp
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4
6
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
5 BUILD/INSTALLATION
17
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
6 ==================
6
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
7
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
8 1) The extension isn't built here, but its code along with dyncall's source is bundled
10
6493c9ed4b33 - ruby and python binding readme updates
cslag
parents: 6
diff changeset
9 in a .gem file to then be built and installed on the target platform.
6
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
10 So, you need dyncall's full source code to be included. Unfortunately, the .gemspec isn't
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
11 flexible enough to pull from different paths, so building the .gem file requires dyncall
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
12 to be found next to rbdc.c and extconf.rb. This means either copy dyncall's base directory
26
Tassilo Philipp
parents: 25
diff changeset
13 to ./dyncall or create a symlink ./dyncall, that points to it.
6
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
14
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
15 2) Then, build this gem with:
17
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
16
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
17 gem build rbdc.gemspec
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18
6
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
19 3) On the target platform, install the gem with:
17
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
20
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
21 gem install rbdc-*.gem
6
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
22
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
23
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
24 API
17
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
25 ===
6
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
26
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
27 l = Dyncall::ExtLib.new
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
28 l.load(libpath)
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
29 l.syms_init(libpath)
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
30 l.syms_count
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
31 l.syms_each { |sym_name| ... }
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
32 l.exists?(:symbolname)
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
33 l.call(:symbolname, sigstring, ...)
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36 SIGNATURE FORMAT
17
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
37 ================
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
38
6
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
39 format: "xxxxx)y"
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
40
17
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
41 x is positional parameter-type charcode, y is result-type charcode
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42
17
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
43 SIG | FROM RUBY | C/C++ | TO RUBY
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
44 ----+-----------------------------------------+--------------------+-----------------------------------
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
45 'v' | | void | NilClass
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
46 'B' | TrueClass, FalseClass, NilClass, Fixnum | bool | TrueClass, FalseClass
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
47 'c' | Fixnum | char | Fixnum
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
48 'C' | Fixnum | unsigned char | Fixnum
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
49 's' | Fixnum | short | Fixnum
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
50 'S' | Fixnum | unsigned short | Fixnum
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
51 'i' | Fixnum | int | Fixnum
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
52 'I' | Fixnum | unsigned int | Fixnum
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
53 'j' | Fixnum | long | Fixnum
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
54 'J' | Fixnum | unsigned long | Fixnum
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
55 'l' | Fixnum | long long | Fixnum
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
56 'L' | Fixnum | unsigned long long | Fixnum
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
57 'f' | Float | float | Float
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
58 'd' | Float | double | Float
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
59 'p' | String (other ruby types? @@@) | void* | unsupported at the moment @@@
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
60 'Z' | String | void* | String
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
61
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
62
17
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
63 TODO
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
64 ====
6
80273969f043 - ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents: 2
diff changeset
65
28
edbbd467f50a python binding:
Tassilo Philipp
parents: 26
diff changeset
66 - signature suffixes used to indicate calling conventions are not supported yet!
17
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
67 - C pointer -> ruby... array?
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
68 - callback support
739c40f35a6a - update READMEs
cslag
parents: 10
diff changeset
69