# HG changeset patch # User cslag # Date 1459027979 -3600 # Node ID 739c40f35a6a3dc948272c87ed1c36fec9d124d9 # Parent a40084782546bd8c7d1f2e8278b331f0dcdbca5a - update READMEs diff -r a40084782546 -r 739c40f35a6a erlang/erldc/README.txt --- a/erlang/erldc/README.txt Sat Mar 26 22:31:42 2016 +0100 +++ b/erlang/erldc/README.txt Sat Mar 26 22:32:59 2016 +0100 @@ -1,3 +1,6 @@ +dyncall erlang bindings (NIF) + + BUILD/INSTALLATION ================== diff -r a40084782546 -r 739c40f35a6a go/godc/README.txt --- a/go/godc/README.txt Sat Mar 26 22:31:42 2016 +0100 +++ b/go/godc/README.txt Sat Mar 26 22:32:59 2016 +0100 @@ -4,17 +4,19 @@ BUILD/INSTALLATION ------------------- +================== 1) make sure dyncall is built and libraries/headers are in include paths or - CGO_CFLAGS points to them, etc. + + CGO_CFLAGS points to them, etc. 2) Build this nut with: - go build + + go build API ---- +=== Since go is low level, dyncall's public functions are pretty much exposed function by function. Referg to dyncall(3) and godc.go. @@ -43,7 +45,7 @@ SIGNATURE FORMAT ----------------- +================ Signature string is only used by ArgF function, rest uses type info from Go. @@ -69,8 +71,11 @@ 'Z' | string | void* | string -ToDo: +TODO +==== + - structs - callbacks - callf wrap (argf already there) +- update cconv modes, so they are up to date diff -r a40084782546 -r 739c40f35a6a lua/luadc/README.txt --- a/lua/luadc/README.txt Sat Mar 26 22:31:42 2016 +0100 +++ b/lua/luadc/README.txt Sat Mar 26 22:32:59 2016 +0100 @@ -22,6 +22,3 @@ dc.call(f, signature, args... ) - - - diff -r a40084782546 -r 739c40f35a6a lua/luadyncall/README.txt --- a/lua/luadyncall/README.txt Sat Mar 26 22:31:42 2016 +0100 +++ b/lua/luadyncall/README.txt Sat Mar 26 22:32:59 2016 +0100 @@ -3,7 +3,7 @@ Build ------ +===== ./bootstrap ./configure make @@ -11,7 +11,7 @@ Package contents ----------------- +================ dynload dynamic loading of code and resolving of symbols dyncall dynamic call to code @@ -48,5 +48,3 @@ ======================================= make srcpkg - - diff -r a40084782546 -r 739c40f35a6a ruby/rbdc/README.txt --- a/ruby/rbdc/README.txt Sat Mar 26 22:31:42 2016 +0100 +++ b/ruby/rbdc/README.txt Sat Mar 26 22:32:59 2016 +0100 @@ -3,7 +3,7 @@ BUILD/INSTALLATION ------------------- +================== 1) The extension isn't built here, but its code along with dyncall's source is bundled in a .gem file to then be built and installed on the target platform. @@ -13,14 +13,16 @@ do ./dyncall or create a symlink ./dyncall, that points to it. 2) Then, build this gem with: - gem build rbdc.gemspec + + gem build rbdc.gemspec 3) On the target platform, install the gem with: - gem install ../../../rbdc-*.gem + + gem install rbdc-*.gem API ---- +=== l = Dyncall::ExtLib.new l.load(libpath) @@ -32,48 +34,36 @@ SIGNATURE FORMAT ----------------- +================ format: "xxxxx)y" - x is positional parameter-type charcode - - 'B' C++: bool <- Ruby: TrueClass, FalseClass, NilClass, Fixnum - 'c' C: char <- Ruby: Fixnum - 'C' C: unsigned char <- Ruby: Fixnum - 's' C: short <- Ruby: Fixnum - 'S' C: unsigned short <- Ruby: Fixnum - 'i' C: int <- Ruby: Fixnum - 'I' C: unsigned int <- Ruby: Fixnum - 'j' C: long <- Ruby: Fixnum - 'J' C: unsigned long <- Ruby: Fixnum - 'l' C: long long <- Ruby: Fixnum - 'L' C: unsigned long long <- Ruby: Fixnum - 'f' C: float <- Ruby: Float - 'd' C: double <- Ruby: Float - 'p' C: void* <- Ruby: String (check if there are other pointer-convertible ruby types @@@) - 'Z' C: void* <- Ruby: String + x is positional parameter-type charcode, y is result-type charcode - y is result-type charcode - - 'v' C: void -> Ruby: NilClass - 'B' C: bool -> Ruby: TrueClass, FalseClass - 'c' C: char -> Ruby: Fixnum - 'C' C: unsigned char -> Ruby: Fixnum - 's' C: short -> Ruby: Fixnum - 'S' C: unsigned short -> Ruby: Fixnum - 'i' C: int -> Ruby: Fixnum - 'I' C: unsigned int -> Ruby: Fixnum - 'j' C: long -> Ruby: Fixnum - 'J' C: unsigned long -> Ruby: Fixnum - 'l' C: long long -> Ruby: Fixnum - 'L' C: unsigned long long -> Ruby: Fixnum - 'f' C: float -> Ruby: Float - 'd' C: double -> Ruby: Float - 'p' C: void* -> unsupported at the moment @@@ - 'Z' C: void* -> Ruby: String + SIG | FROM RUBY | C/C++ | TO RUBY + ----+-----------------------------------------+--------------------+----------------------------------- + 'v' | | void | NilClass + 'B' | TrueClass, FalseClass, NilClass, Fixnum | bool | TrueClass, FalseClass + 'c' | Fixnum | char | Fixnum + 'C' | Fixnum | unsigned char | Fixnum + 's' | Fixnum | short | Fixnum + 'S' | Fixnum | unsigned short | Fixnum + 'i' | Fixnum | int | Fixnum + 'I' | Fixnum | unsigned int | Fixnum + 'j' | Fixnum | long | Fixnum + 'J' | Fixnum | unsigned long | Fixnum + 'l' | Fixnum | long long | Fixnum + 'L' | Fixnum | unsigned long long | Fixnum + 'f' | Float | float | Float + 'd' | Float | double | Float + 'p' | String (other ruby types? @@@) | void* | unsupported at the moment @@@ + 'Z' | String | void* | String --> Note that signature suffixes used to indicate calling --> conventions, are not supported yet! @@@ +TODO +==== +- support signature suffixes used to indicate calling conventions, are not supported yet! +- C pointer -> ruby... array? +- callback support +