2件ヒット
[1-2件を表示]
(0.016秒)
モジュール
-
Fiddle
:: Importer (2)
検索結果
-
Fiddle
:: Importer # union(signature) -> Class (54364.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... -
Fiddle
:: Importer # sizeof(t) -> Integer (43.0) -
C における sizeof(t) の値を返します。
...r t として文字列を渡し、それが表している型を Fiddle が知らなかった
場合に発生します
例:
require 'fiddle/import'
module M
extend Fiddle::Importer
Timeval = struct(["long tv_sec", "long tv_usec"])
p sizeof("char") # => 1
p sizeof("voi...