sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
FFI::Library#typedef
Register or get an already registered type definition.
To register a new type definition, +old+ should be a {FFI::Type}. +add+
is in this case the type definition.
If +old+ is a {DataConverter}, a {Type::Mapped} is returned.
If +old+ is +:enum+
* and +add+ is an +Array+, a call to {#enum} is made with +add+ as single parameter;
* in others cases, +info+ is used to create a named enum.
If +old+ is a key for type map, #typedef get +old+ type definition.Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/ffi-1.11.3/lib/ffi/library.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-FFI--Library-typedef-for-pr
# Commit to gitgit add app/server/ruby/vendor/ffi-1.11.3/lib/ffi/library.rbgit commit -m "better docs for FFI::Library#typedef"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-FFI--Library-typedef-for-pr
hub pull-request
# Celebrate!