Mercurial > pub > dyncall > bindings
annotate ruby/rbdc/README.txt @ 14:7752fcb107e7
- erlang binding build fix, linker arg was at wrong place
author | cslag |
---|---|
date | Sat, 26 Mar 2016 16:09:04 +0100 |
parents | 6493c9ed4b33 |
children | 739c40f35a6a |
rev | line source |
---|---|
0 | 1 dyncall ruby bindings |
10 | 2 Copyright 2007-2016 Tassilo Philipp |
0 | 3 |
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 |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
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 | 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 |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
13 do ./dyncall or create a symlink ./dyncall, that points to it. |
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: |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
16 gem build rbdc.gemspec |
0 | 17 |
6
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
18 3) On the target platform, install the gem with: |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
19 gem install ../../../rbdc-*.gem |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
20 |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
21 |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
22 API |
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 |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
25 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
|
26 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
|
27 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
|
28 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
|
29 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
|
30 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
|
31 l.call(:symbolname, sigstring, ...) |
0 | 32 |
33 | |
34 SIGNATURE FORMAT | |
6
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
35 ---------------- |
0 | 36 |
6
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
37 format: "xxxxx)y" |
0 | 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 x is positional parameter-type charcode |
0 | 40 |
6
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
41 'B' C++: bool <- Ruby: TrueClass, FalseClass, NilClass, Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
42 'c' C: char <- Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
43 'C' C: unsigned char <- Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
44 's' C: short <- Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
45 'S' C: unsigned short <- Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
46 'i' C: int <- Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
47 'I' C: unsigned int <- Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
48 'j' C: long <- Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
49 'J' C: unsigned long <- Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
50 'l' C: long long <- Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
51 'L' C: unsigned long long <- Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
52 'f' C: float <- Ruby: Float |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
53 'd' C: double <- Ruby: Float |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
54 'p' C: void* <- Ruby: String (check if there are other pointer-convertible ruby types @@@) |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
55 'Z' C: void* <- Ruby: String |
0 | 56 |
6
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
57 y is result-type charcode |
0 | 58 |
6
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
59 'v' C: void -> Ruby: NilClass |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
60 'B' C: bool -> Ruby: TrueClass, FalseClass |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
61 'c' C: char -> Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
62 'C' C: unsigned char -> Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
63 's' C: short -> Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
64 'S' C: unsigned short -> Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
65 'i' C: int -> Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
66 'I' C: unsigned int -> Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
67 'j' C: long -> Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
68 'J' C: unsigned long -> Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
69 'l' C: long long -> Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
70 'L' C: unsigned long long -> Ruby: Fixnum |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
71 'f' C: float -> Ruby: Float |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
72 'd' C: double -> Ruby: Float |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
73 'p' C: void* -> unsupported at the moment @@@ |
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
74 'Z' C: void* -> Ruby: String |
0 | 75 |
76 | |
77 -> Note that signature suffixes used to indicate calling | |
78 -> conventions, are not supported yet! @@@ | |
6
80273969f043
- ruby binding path cleanup, previous version required bindings and dyncall be checked out in same parent directory
cslag
parents:
2
diff
changeset
|
79 |