2件ヒット
[1-2件を表示]
(0.009秒)
モジュール
-
Fiddle
:: Importer (2)
検索結果
先頭2件
-
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (64.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
...::Function オブジェクトを返します。
@param signature 関数の名前とシネグチャ
@param opts オプション
例
require 'fiddle/import'
module M
extend Fiddle::Importer
dlload "libc.so.6"
typealias "size_t", "unsigned long"
extern "int qsort(void*, size_t,... -
Fiddle
:: Importer # union(signature) -> Class (46.0) -
C の共用体型に対応する Ruby のクラスを構築して返します。
...typedef union epoll_data
{
void *ptr;
int fd;
uint32_t u32;
uint64_t u64;
} epoll_data_t;
は、Ruby上では
require 'fiddle/import'
module M
extend Fiddle::Importer
dlload "libc.so.6"
typealias("uint32_t", "unsigned int")
typealias("uint64_t", "unsigne...