42件ヒット
[1-42件を表示]
(0.074秒)
別のキーワード
クラス
- Array (18)
-
Fiddle
:: Function (12)
モジュール
検索結果
先頭4件
-
Array
# pack(template , buffer: String . new) -> String (108.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...npack("p") # => ["foo"]
"xp\xC2\x85\vV\x00\x00".unpack("p")
# => ArgumentError: no associated pointer
//}
"p" や "P" は、nil を特別に扱い NULL
ポインタとして解釈します。(以下は、64bitマシンで一般的な結果)
//emlist[][ruby]{
[nil].pack("p") # => "\x00\x00... -
Fiddle
:: Function # call(*args) -> Integer|DL :: CPtr|nil (19.0) -
関数を呼び出します。
...関数を呼び出します。
Fiddle::Function.new で指定した引数と返り値の型に基いて
Ruby のオブジェクトを適切に C のデータに変換して C の関数を呼び出し、
その返り値を Ruby のオブジェクトに変換して返します。
引数の変換は......以下の通りです。
: void* (つまり任意のポインタ型)
nil ならば C の NULL に変換されます
Fiddle::Pointer は保持している C ポインタに変換されます。
文字列であればその先頭ポインタになります。
IO オブジェクトであれば......。
: void
nil を返します
: (unsigned) char/short/int/long/long long
C の整数を Ruby の整数に変換します
: void*(つまり任意のポインタ型)
C のポインタを保持した Fiddle::Pointer を返します。
@param args 関数の引数
@see Fiddle::Function.new... -
JSON
:: Generator :: GeneratorMethods :: NilClass # to _ json(state _ or _ hash = nil) -> String (19.0) -
自身から生成した JSON 形式の文字列を返します。
...文字列を返します。
"null" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
nil.to_json # => "null"
//}... -
Array
# pack(template) -> String (8.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...npack("p") # => ["foo"]
"xp\xC2\x85\vV\x00\x00".unpack("p")
# => ArgumentError: no associated pointer
//}
"p" や "P" は、nil を特別に扱い NULL
ポインタとして解釈します。(以下は、64bitマシンで一般的な結果)
//emlist[][ruby]{
[nil].pack("p") # => "\x00\x00...