るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
133件ヒット [1-100件を表示] (0.035秒)
トップページ > クエリ:int[x] > クエリ:type[x] > バージョン:3.2[x]

別のキーワード

  1. socket int
  2. prime int_from_prime_division
  3. _builtin to_int
  4. mkmf convertible_int
  5. option int

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

Socket::AncillaryData.int(family, cmsg_level, cmsg_type, integer) -> Socket::AncillaryData (54943.0)

データとして整数を保持する Socket::AncillaryData オブジェクトを生成します。

データとして整数を保持する
Socket::AncillaryData オブジェクトを生成します。

整数データのサイズおよびエンディアンは実行するホストによって異なります。

require 'socket'

p Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, STDERR.fileno)
#=> #<Socket::AncillaryData: UNIX SOCKET RIGHTS 2>

@param family ソケットファミリー
@param cmsg_level プロトコル
@param cmsg_type 補...

Socket::AncillaryData#type -> Integer (54670.0)

自身が保持している cmsg type (種類) を返します。

自身が保持している cmsg type (種類) を返します。

require 'socket'

p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").type
#=> 2

@see Socket::AncillaryData.new

Fiddle::TYPE_INT -> Integer (36973.0)

C の int 型を表す定数。

C の int 型を表す定数。

unsigned int を表すには符号を逆転させます。

Fiddle::TYPE_INTPTR_T -> Integer (36904.0)

C の intptr_t 型を表す定数。

C の intptr_t 型を表す定数。

Fiddle::TYPE_UINTPTR_T -> Integer (36904.0)

C の uintptr_t 型を表す定数。

C の uintptr_t 型を表す定数。

絞り込み条件を変える

WIN32OLE_TYPE#typekind -> Integer (27691.0)

selfの種類を示す値を取得します。

selfの種類を示す値を取得します。

値の意味については、WIN32OLE_TYPE#ole_typeを参照してください。

@return 型の種類を示す数値を返します。
@raise WIN32OLERuntimeError 型の種類(TYPEKIND)を取得できない場合に通知します。

tobj = WIN32OLE_TYPE.new('Microsoft Word 14.0 Object Library', 'Documents')
p tobj.typekind # => 4

@see WIN32OLE_TYPE#ole_type

Kernel#convertible_int(type, headers = nil, opts = nil) (19285.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are p...

Kernel#convertible_int(type, headers = nil, opts = nil) { ... } (19285.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are p...

VALUE rb_convert_type(VALUE val, int type, const char *tname, const char *method) (18967.0)

オブジェクト val をクラス type のインスタンスに変換します。 変換には、val.method の戻り値が使われます。

オブジェクト val をクラス type のインスタンスに変換します。
変換には、val.method の戻り値が使われます。

val がもともと type クラスのインスタンスなら val を
そのまま返します。

VALUE rb_check_convert_type(VALUE val, int type, const char *tname, const char *method) (18937.0)

val.method を実行してクラス tname のインスタンスを返します。 val がメソッド method を持たなければ nil を返します。

val.method を実行してクラス tname のインスタンスを返します。
val がメソッド method を持たなければ nil を返します。

type は、T_ARRAY, T_STRING などの構造体を表す ID です。
method の結果の型が type でなければ例外 TypeError が発生します。

絞り込み条件を変える

void Check_Type(VALUE val, int typeflag) (18901.0)

val の構造体型フラグが typeflag でなければ 例外 TypeError を発生します。val は即値の VALUE であっても 構いません。

val の構造体型フラグが typeflag でなければ
例外 TypeError を発生します。val は即値の VALUE であっても
構いません。

Socket::Constants::IPV6_RTHDR_TYPE_0 -> Integer (18652.0)

Routing header type 0。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Routing header type 0。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
3542

Socket::Constants::SO_TYPE -> Integer (18652.0)

Get the socket type。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Get the socket type。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see sys/socket.h(header), getsockopt(2freebsd),
socket(7linux), Socket::Constants::SOL_SOCKET

Socket::IPV6_RTHDR_TYPE_0 -> Integer (18652.0)

Routing header type 0。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Routing header type 0。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
3542

Socket::SO_TYPE -> Integer (18652.0)

Get the socket type。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Get the socket type。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see sys/socket.h(header), getsockopt(2freebsd),
socket(7linux), Socket::Constants::SOL_SOCKET

絞り込み条件を変える

Socket::Constants::EAI_SOCKTYPE -> Integer (18649.0)

Socket type not supported

Socket type not supported

getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。

@see getaddrinfo(3linux), gai_strerror(3freebsd)

Socket::EAI_SOCKTYPE -> Integer (18649.0)

Socket type not supported

Socket type not supported

getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。

@see getaddrinfo(3linux), gai_strerror(3freebsd)

Socket::Constants::SCM_BINTIME -> Integer (18619.0)

Timestamp (bintime).

Timestamp (bintime).

Socket::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#timestamp
BasicSocket#sendmsg, BasicSocket#recvmsg

Socket::SCM_BINTIME -> Integer (18619.0)

Timestamp (bintime).

Timestamp (bintime).

Socket::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#timestamp
BasicSocket#sendmsg, BasicSocket#recvmsg

WIN32OLE_METHOD#return_vtype -> Integer (18619.0)

メソッドの返り値の型を示す数値を取得します。

メソッドの返り値の型を示す数値を取得します。

@return 返り値の型を示す数値(VARENUM)を返します。
@raise WIN32OLERuntimeError メソッドの型情報を取得できなかった場合に通知します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Application')
method = WIN32OLE_METHOD.new(tobj, 'Visible')
puts method.return_vtype # => 11

VARENUMの定義は、Platfo...

絞り込み条件を変える

Fiddle::TYPE_CHAR -> Integer (18604.0)

C の char 型を表す定数。

C の char 型を表す定数。

unsigned char を表すには符号を逆転させます。

Fiddle::TYPE_DOUBLE -> Integer (18604.0)

C の double 型を表す定数。

C の double 型を表す定数。

Fiddle::TYPE_FLOAT -> Integer (18604.0)

C の float 型を表す定数。

C の float 型を表す定数。

Fiddle::TYPE_LONG -> Integer (18604.0)

C の long 型を表す定数。

C の long 型を表す定数。

unsigned long を表すには符号を逆転させます。

Fiddle::TYPE_LONG_LONG -> Integer (18604.0)

C の long long 型を表す定数。

C の long long 型を表す定数。

unsigned long long を表すには符号を逆転させます。

絞り込み条件を変える

Fiddle::TYPE_PTRDIFF_T -> Integer (18604.0)

C の ptrdiff_t 型を表す定数。

C の ptrdiff_t 型を表す定数。

Fiddle::TYPE_SHORT -> Integer (18604.0)

C の short 型を表す定数。

C の short 型を表す定数。

unsigned short を表すには符号を逆転させます。

Fiddle::TYPE_SIZE_T -> Integer (18604.0)

C の size_t 型を表す定数。

C の size_t 型を表す定数。

Fiddle::TYPE_SSIZE_T -> Integer (18604.0)

C の ssize_t 型を表す定数。

C の ssize_t 型を表す定数。

Fiddle::TYPE_VOID -> Integer (18604.0)

C の void を表す定数。

C の void を表す定数。

絞り込み条件を変える

Fiddle::TYPE_VOIDP -> Integer (18604.0)

C の void* 型を表す定数。

C の void* 型を表す定数。

OpenSSL::X509::Name::DEFAULT_OBJECT_TYPE -> Integer (18604.0)

属性値のデフォルトの ASN.1 の型です。

属性値のデフォルトの ASN.1 の型です。

OpenSSL::X509::Name.parse や OpenSSL::X509::Name.new で
template に指定されなかった属性はこの型であると仮定して処理されます。

OpenSSL::ASN1::UTF8STRING を返します。

OpenSSL::X509::Name::OBJECT_TYPE_TEMPLATE -> { String => Integer } (18604.0)

属性型に対応する ASN.1の型を格納したハッシュです。

属性型に対応する ASN.1の型を格納したハッシュです。

OpenSSL::X509::Name.parse や OpenSSL::X509::Name.new
などでデフォルト値として使われます。

キーは属性型文字列で、ASN.1の型を表わす整数が対応します。

以下の文字列がキーです。
'C', 'countryName', 'serialNumber', 'dnQualifier',
'DC', 'domainComponent', 'emailAddress'

Socket::Constants::IPX_TYPE -> Integer (18604.0)

@todo

@todo

Socket::IPX_TYPE -> Integer (18604.0)

@todo

@todo

絞り込み条件を変える

Zlib::ZStream#data_type -> Integer (18604.0)

ストリームに入力されたデータの形式を推測します。 返り値は Zlib::BINARY, Zlib::ASCII, Zlib::UNKNOWN の いずれかです。

ストリームに入力されたデータの形式を推測します。
返り値は Zlib::BINARY, Zlib::ASCII, Zlib::UNKNOWN の
いずれかです。

Addrinfo#socktype -> Integer (18601.0)

ソケットタイプを整数で返します。

ソケットタイプを整数で返します。

require 'socket'

Addrinfo.tcp("localhost", 80).socktype == Socket::SOCK_STREAM #=> true

Fiddle::Closure#ctype -> Integer (18601.0)

返り値の型を返します。

返り値の型を返します。

WIN32OLE_VARIANT#vartype -> Integer (18601.0)

selfの型情報を取得します。

selfの型情報を取得します。

型情報は、WIN32OLE::VARIANTの定数値の組み合わせです。

obj = WIN32OLE_VARIANT.new("string")
obj.vartype # => 8 (WIN32OLE::VARIANT::VT_BSTR)
bytes = WIN32OLE_VARIANT.new([1,2,3,4,5], VT_UI1 | VT_ARRAY)
bytes.vartype # => 8209 (WIN32OLE::VARIANT::VT_ARRAY | VT_UI1)

int BUILTIN_TYPE(VALUE obj) (18601.0)

obj の構造体型 ID を返します。 SPECIAL_CONST_P(obj) が真のオブジェクトに対して使うと落ちます。

obj の構造体型 ID を返します。
SPECIAL_CONST_P(obj) が真のオブジェクトに対して使うと落ちます。

絞り込み条件を変える

int TYPE(VALUE obj) (18601.0)

obj の構造体型 ID を返します。

obj の構造体型 ID を返します。

static VALUE convert_type(VALUE val, const char *tname, const char *method, int raise) (18601.0)

WIN32OLE_METHOD#event_interface -> String | nil (18319.0)

メソッドがイベントの場合、イベントのインターフェイス名を取得します。

メソッドがイベントの場合、イベントのインターフェイス名を取得します。

@return メソッドがイベントであれば、イベントのインターフェイス名を返し
ます。イベントでなければnilを返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbook')
method = WIN32OLE_METHOD.new(tobj, 'SheetActivate')
puts method.event_interface # => WorkbookEvents

fiddle/types (18037.0)

C の型の別名を定義するライブラリです。

C の型の別名を定義するライブラリです。

Fiddle::Win32Types や Fiddle::BasicTypes を Module#include する
ことで、Fiddle::Importer#extern や Fiddle::Importer#struct で
利用できる型が増えます。内部で Fiddle::Importer#typealias を
呼び出しています。

実装の問題があるため、 Fiddle::Importer#dlload を呼びだしてから
include してください。


require 'fiddle/import'
require 'fiddl...

Fiddle::BasicTypes (18019.0)

よく使われる型の別名を定義するモジュールです。

よく使われる型の別名を定義するモジュールです。

include すると 以下の型が定義されます。
* "uint"
* "u_int"
* "ulong"
* "u_long"

絞り込み条件を変える

OpenSSL::SSL::OP_SSLREF2_REUSE_CERT_TYPE_BUG -> Integer (9604.0)

SSL 通信での各種バグ回避コードを有効にするフラグです。

SSL 通信での各種バグ回避コードを有効にするフラグです。

OpenSSL::SSL::SSLContext#options= で利用します。

通常は OpenSSL::SSL::OP_ALL でこれらすべてを有効にします。
特定のフラグのみ無効にしたい場合は例えば

ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS

などとします。

Etc::SC_TYPED_MEMORY_OBJECTS -> Integer (9601.0)

Etc.#sysconf の引数に指定します。

Etc.#sysconf の引数に指定します。

詳細は sysconf(3) を参照してください。

WIN32OLE_TYPE#helpcontext -> Integer | nil (9319.0)

この型に関連するヘルプファイルのトピックID(ヘルプコンテキスト)を取得 します。

この型に関連するヘルプファイルのトピックID(ヘルプコンテキスト)を取得
します。

@return 型に関連するヘルプコンテキストを整数で返します。ヘルプコンテキ
ストが登録されていない場合はnilを返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
puts tobj.helpcontext # => 131185

WIN32OLE_TYPE#major_version -> Integer (9319.0)

型のメジャーバージョン番号を取得します。

型のメジャーバージョン番号を取得します。

@return 型のメジャーバージョン番号を整数で返します。
@raise WIN32OLERuntimeError 型属性の読み取りに失敗すると通知します。

tobj = WIN32OLE_TYPE.new('Microsoft Word 14.0 Object Library', 'Documents')
p tobj.major_version # => 8

WIN32OLE_TYPE#minor_version -> Integer (9319.0)

型のマイナーバージョン番号を取得します。

型のマイナーバージョン番号を取得します。

@return 型のマイナーバージョン番号を整数で返します。
@raise WIN32OLERuntimeError 型属性の読み取りに失敗すると通知します。

tobj = WIN32OLE_TYPE.new('Microsoft Word 14.0 Object Library', 'Documents')
p tobj.minor_version # => 5

絞り込み条件を変える

WEBrick::HTTPStatus::RC_INTERNAL_SERVER_ERROR (9304.0)

HTTP のステータスコードを表す整数です。

HTTP のステータスコードを表す整数です。

require 'webrick'
p WEBrick::HTTPStatus::RC_INTERNAL_SERVER_ERROR #=> 500

Net::IMAP::BodyTypeBasic#size -> Integer (9301.0)

ボディのサイズのオクテット数を返します。

ボディのサイズのオクテット数を返します。

Net::IMAP::BodyTypeMessage#lines -> Integer (9301.0)

ボディのテキストの行数を返します。

ボディのテキストの行数を返します。

Net::IMAP::BodyTypeMessage#size -> Integer (9301.0)

ボディのサイズのオクテット数を返します。

ボディのサイズのオクテット数を返します。

Net::IMAP::BodyTypeText#lines -> Integer (9301.0)

ボディの行数を返します。

ボディの行数を返します。

絞り込み条件を変える

Net::IMAP::BodyTypeText#size -> Integer (9301.0)

ボディのサイズのオクテット数を返します。

ボディのサイズのオクテット数を返します。

WIN32OLE_TYPELIB#major_version -> Integer (9301.0)

TypeLibのメジャーバージョン番号を取得します。

TypeLibのメジャーバージョン番号を取得します。

@return TypeLibのメジャーバージョン番号を整数で返します。
@raise WIN32OLERuntimeError TypeLibの属性が読み取れない場合に通知します。

tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts tlib.major_version # => 1

WIN32OLE_TYPELIB#minor_version -> Integer (9301.0)

TypeLibのマイナーバージョン番号を取得します。

TypeLibのマイナーバージョン番号を取得します。

@return TypeLibのマイナーバージョン番号を整数で返します。
@raise WIN32OLERuntimeError TypeLibの属性が読み取れない場合に通知します。

tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts tlib.minor_version # => 7

st_table * st_init_table_with_size(struct st_hash_type *type, int size) (949.0)

st_table を作成する。_with_size はサイズを指定して生成する。 struct st_hash_type はハッシュ値を得る関数と、同値判定を行う 関数を持つ。

st_table を作成する。_with_size はサイズを指定して生成する。
struct st_hash_type はハッシュ値を得る関数と、同値判定を行う
関数を持つ。

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (787.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

絞り込み条件を変える

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (787.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

Fiddle::Function.new(ptr, args, ret_type, abi=Fiddle::Function::DEFAULT, name: nil) -> Fiddle::Function (700.0)

ptr (関数ポインタ)から Fiddle::Function オブジェクトを 生成します。

ptr (関数ポインタ)から Fiddle::Function オブジェクトを
生成します。

ptr には Fiddle::Handle から Fiddle::Handle#sym などで取りだした
関数ポインタ(を表す整数)、もしくは関数を指している
Fiddle::Pointer を渡します。

args、ret_type で関数の引数と返り値の型を指定します。これには以下の
定数が利用できます。「-TYPE_INT」 のように符号を反転させると unsigned を
意味します。
* Fiddle::TYPE_VOID
* Fiddle::TYPE_VOIDP
* Fidd...

void Data_Get_Struct(VALUE obj, type, type *svar) (685.0)

Ruby のオブジェクト obj から type 型へのポインタを とりだし svar に代入します。

Ruby のオブジェクト obj から type 型へのポインタを
とりだし svar に代入します。

使用例

struct mytype {
int i;
char *s;
};

VALUE
my_i(VALUE self)
{
struct mytype *m;
Data_Get_Struct(self, struct mytype, m);
return INT2NUM(m->i);
}

Kernel#check_sizeof(type, headers = nil) -> Integer | nil (679.0)

与えられた型のサイズを返します。

与えられた型のサイズを返します。

型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。

例えば、

require 'mkmf'
check_sizeof('mystruct') # => 12

である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。

@param type 検査したい型を指定します。

@param headers 追加のヘッダファイルを指定します。

Kernel#check_sizeof(type, headers = nil) { ... } -> Integer | nil (679.0)

与えられた型のサイズを返します。

与えられた型のサイズを返します。

型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。

例えば、

require 'mkmf'
check_sizeof('mystruct') # => 12

である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。

@param type 検査したい型を指定します。

@param headers 追加のヘッダファイルを指定します。

絞り込み条件を変える

VALUE Data_Make_Struct(VALUE klass, type, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free, type *svar) (667.0)

type 型の構造体をヒープに割り当ててそれへのポインタを svar に代入し、クラス klass のインスタンスである Ruby のオブジェクトを生成し、それを返します。mark free はそれぞれマーク用・解放用の関数へのポインタです。 どちらも、必要ないときはかわりに 0 を渡します。

type 型の構造体をヒープに割り当ててそれへのポインタを
svar に代入し、クラス klass のインスタンスである
Ruby のオブジェクトを生成し、それを返します。mark
free はそれぞれマーク用・解放用の関数へのポインタです。
どちらも、必要ないときはかわりに 0 を渡します。

また RUBY_DATA_FUNC の定義は以下のようです。

typedef void (*RUBY_DATA_FUNC)(void *st)

第一引数 st には svar の値が渡されます。

使用例

struct mytype {
int i;
...

int MEMCMP(p1, p2, type, n) (649.0)

type 型のメモリ領域 p1 と p2 の先頭 n 個を比較する。 p1 が p2 の最初の n 個より小さい、等しい、大きいとき、そ れぞれ正、0、負の値を返す。

type 型のメモリ領域 p1 と p2 の先頭 n 個を比較する。
p1 が p2 の最初の n 個より小さい、等しい、大きいとき、そ
れぞれ正、0、負の値を返す。

void NEWOBJ(obj, int typeflag) (601.0)

void OBJSETUP(obj, VALUE klass, int typeflag) (601.0)

obj をクラス klass とフラグ typeflag で初期化する。

obj をクラス klass とフラグ typeflag で初期化する。

Fiddle::Importer#create_value(type, val = nil) -> Fiddle::CStruct (427.0)

型が type で要素名が "value" であるような構造体を 定義(Fiddle::Importer#struct)し、 その構造体のメモリを Fiddle::CStruct#malloc で確保し、 確保したメモリを保持しているオブジェクトを返します。

型が type で要素名が "value" であるような構造体を
定義(Fiddle::Importer#struct)し、
その構造体のメモリを Fiddle::CStruct#malloc で確保し、
確保したメモリを保持しているオブジェクトを返します。

type は "int", "void*" といった文字列で型を指定します。
val に nil 以外を指定すると、確保された構造体に
その値を代入します。

@param type 型を表す文字列
@param val 構造体に確保される初期値


require 'fiddle/import'

module M
...

絞り込み条件を変える

Fiddle::Importer#value(type, val = nil) -> Fiddle::CStruct (427.0)

型が type で要素名が "value" であるような構造体を 定義(Fiddle::Importer#struct)し、 その構造体のメモリを Fiddle::CStruct#malloc で確保し、 確保したメモリを保持しているオブジェクトを返します。

型が type で要素名が "value" であるような構造体を
定義(Fiddle::Importer#struct)し、
その構造体のメモリを Fiddle::CStruct#malloc で確保し、
確保したメモリを保持しているオブジェクトを返します。

type は "int", "void*" といった文字列で型を指定します。
val に nil 以外を指定すると、確保された構造体に
その値を代入します。

@param type 型を表す文字列
@param val 構造体に確保される初期値


require 'fiddle/import'

module M
...

Socket::AncillaryData#ip_pktinfo -> [Addrinfo, Integer, Addrinfo] (367.0)

自身の type が IP_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス、ローカルアドレス) を3要素の配列で返します。

自身の type が IP_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス、ローカルアドレス)
を3要素の配列で返します。

IP_PKTINFO は非標準的拡張であり、システムによっては使えない場合があります。

require 'socket'

addr = Addrinfo.ip("127.0.0.1")
ifindex = 0
spec_dest = Addrinfo.ip("127.0.0.1")
ancdata = Socket::AncillaryData.ip_pktinfo(addr, ifindex, spe...

Net::FTP::MLSxEntry#facts -> { String => String|Integer|Time } (355.0)

そのエントリの「facts」を返します。

そのエントリの「facts」を返します。

facts とはそのエントリに関するファイルサイズなどの様々な情報です。
Net::FTP はこの情報を文字列をキーとするハッシュテーブルで
返します。
標準では以下のような facts が定義されています。これらの facts には
対応するメソッドが定義されています。すべてのサーバでこれら
の facts がすべて実装されているわけではありません。
3659 では
modify, perm, type, size, unique はすべてのサーバで
対応すべき(SHOULD)、とされています。


* "modify" : 変更時刻 (Ti...

Socket::AncillaryData#ipv6_pktinfo -> [Addrinfo, Integer] (349.0)

自身の type が IPV6_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス) を2要素の配列で返します。

自身の type が IPV6_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス)
を2要素の配列で返します。

IPV6_PKTINFO については 3542 を参照してください。

require 'socket'

addr = Addrinfo.ip("::1")
ifindex = 0
ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
p ancdata.ipv6_pktinfo #=> [#<Addrinfo: ::1>, 0]

@see Socke...

Socket::AncillaryData#ipv6_pktinfo_ifindex -> Integer (349.0)

自身の type が IPV6_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス) のインデックスを返します。

自身の type が IPV6_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス)
のインデックスを返します。

require 'socket'

addr = Addrinfo.ip("::1")
ifindex = 0
ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
p ancdata.ipv6_pktinfo_ifindex #=> 0

@see Socket::AncillaryData.ipv6_pktinfo,
Socket::Anc...

絞り込み条件を変える

Socket::Constants::EAI_SERVICE -> Integer (349.0)

Servname not supported for socket type

Servname not supported for socket type

getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。

@see getaddrinfo(3linux), gai_strerror(3freebsd)

Socket::Constants::IP_TOS -> Integer (349.0)

IP type-of-service。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

IP type-of-service。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd), ip(7linux)

Socket::Constants::SOCK_DGRAM -> Integer (349.0)

データグラム通信。 Socket.open の第二引数 type に使用します。

データグラム通信。
Socket.open の第二引数 type に使用します。

@see socket(2), Socket.open

Socket::Constants::SOCK_PACKET -> Integer (349.0)

デバイスレベルインターフェース。Obsoleteであり使うべきではない。 Socket.open の第二引数 type に使用します。

デバイスレベルインターフェース。Obsoleteであり使うべきではない。
Socket.open の第二引数 type に使用します。

@see packet(7linux), Socket.open

Socket::Constants::SOCK_RAW -> Integer (349.0)

RAW ソケット。 Socket.open の第二引数 type に使用します。

RAW ソケット。
Socket.open の第二引数 type に使用します。

@see sys/socket.h(header), socket(2linux),
raw(7linux), Socket.open

絞り込み条件を変える

Socket::Constants::SOCK_RDM -> Integer (349.0)

信頼性のあるデータグラム通信。 Socket.open の第二引数 type に使用します。

信頼性のあるデータグラム通信。
Socket.open の第二引数 type に使用します。

@see socket(2linux), Socket.open

Socket::Constants::SOCK_SEQPACKET -> Integer (349.0)

固定最大長を持つストリーム通信。 Socket.open の第二引数 type に使用します。

固定最大長を持つストリーム通信。
Socket.open の第二引数 type に使用します。

@see Socket.open, socket(2), socket(2linux),
socket(2freebsd)

Socket::Constants::SOCK_STREAM -> Integer (349.0)

ストリーム通信。 Socket.open の第二引数 type に使用します。

ストリーム通信。
Socket.open の第二引数 type に使用します。

@see Socket.open, socket(2), socket(2linux),
socket(2freebsd)

Socket::EAI_SERVICE -> Integer (349.0)

Servname not supported for socket type

Servname not supported for socket type

getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。

@see getaddrinfo(3linux), gai_strerror(3freebsd)

Socket::IP_TOS -> Integer (349.0)

IP type-of-service。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

IP type-of-service。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd), ip(7linux)

絞り込み条件を変える

Socket::SOCK_DGRAM -> Integer (349.0)

データグラム通信。 Socket.open の第二引数 type に使用します。

データグラム通信。
Socket.open の第二引数 type に使用します。

@see socket(2), Socket.open

Socket::SOCK_PACKET -> Integer (349.0)

デバイスレベルインターフェース。Obsoleteであり使うべきではない。 Socket.open の第二引数 type に使用します。

デバイスレベルインターフェース。Obsoleteであり使うべきではない。
Socket.open の第二引数 type に使用します。

@see packet(7linux), Socket.open

Socket::SOCK_RAW -> Integer (349.0)

RAW ソケット。 Socket.open の第二引数 type に使用します。

RAW ソケット。
Socket.open の第二引数 type に使用します。

@see sys/socket.h(header), socket(2linux),
raw(7linux), Socket.open

Socket::SOCK_RDM -> Integer (349.0)

信頼性のあるデータグラム通信。 Socket.open の第二引数 type に使用します。

信頼性のあるデータグラム通信。
Socket.open の第二引数 type に使用します。

@see socket(2linux), Socket.open

Socket::SOCK_SEQPACKET -> Integer (349.0)

固定最大長を持つストリーム通信。 Socket.open の第二引数 type に使用します。

固定最大長を持つストリーム通信。
Socket.open の第二引数 type に使用します。

@see Socket.open, socket(2), socket(2linux),
socket(2freebsd)

絞り込み条件を変える

Socket::SOCK_STREAM -> Integer (349.0)

ストリーム通信。 Socket.open の第二引数 type に使用します。

ストリーム通信。
Socket.open の第二引数 type に使用します。

@see Socket.open, socket(2), socket(2linux),
socket(2freebsd)

Zlib::ASCII -> Integer (349.0)

Zlib::ZStream#data_type の返す、データタイプを表す整数です。

Zlib::ZStream#data_type の返す、データタイプを表す整数です。

Zlib::BINARY -> Integer (349.0)

Zlib::ZStream#data_type の返す、データタイプを表す整数です。

Zlib::ZStream#data_type の返す、データタイプを表す整数です。

Zlib::UNKNOWN -> Integer (349.0)

Zlib::ZStream#data_type の返す、データタイプを表す整数です。

Zlib::ZStream#data_type の返す、データタイプを表す整数です。

BasicSocket#sendmsg(mesg, flags=0, dest_sockaddr=nil, *controls) -> Integer (337.0)

sendmsg(2) を用いてメッセージを送ります。

sendmsg(2) を用いてメッセージを送ります。

このメソッドはブロックします。ノンブロッキング方式で通信したい
場合は BasicSocket#sendmsg_nonblock を用います。

ソケットが connection-less の場合は dest_sockaddr で
通信先のアドレスを指定しなければなりません。Socket.sockaddr_in
の返り値や Addrinfo オブジェクトを引数として渡すことができます。

controls には 補助データ(ancillary data)を渡します。
Socket::AncillaryData のインスタンスや
3要素(c...

絞り込み条件を変える

Fiddle::Closure (325.0)

コールバック関数を表すクラスです。

コールバック関数を表すクラスです。

Ruby のメソッド(call)を C の関数ポインタとして表現するためのクラスです。

FFI の closure の wrapper です。

利用法としては、このクラスのサブクラスを作って
そのサブクラスに call メソッドを定義し、
new でオブジェクトを生成することで利用します。

require 'fiddle'
include Fiddle # TYPE_* を使うために include する

class Compare < Fiddle::Closure
# qsort の比較関数は 型が int(*)(v...

Socket::Constants::SCM_CREDENTIALS -> Integer (319.0)

The sender's credentials

The sender's credentials

Socket::AncillaryData の type として利用します。

@see Socket::AncillaryData,
BasicSocket#sendmsg, BasicSocket#recvmsg,
unix(7linux)

Socket::Constants::SCM_CREDS -> Integer (319.0)

Process credentials

Process credentials

Socket::AncillaryData の type として利用します。

@see Socket::AncillaryData,
BasicSocket#sendmsg, BasicSocket#recvmsg,
unix(4freebsd)

Socket::Constants::SCM_RIGHTS -> Integer (319.0)

Access rights.

Access rights.

Socket::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#unix_rights
BasicSocket#sendmsg, BasicSocket#recvmsg,
unix(7linux), unix(4freebsd),
sys/socket.h(header)

Socket::Constants::SCM_TIMESTAMP -> Integer (319.0)

Timestamp (timeval).

Timestamp (timeval).

Socket::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#timestamp
BasicSocket#sendmsg, BasicSocket#recvmsg

絞り込み条件を変える

<< 1 2 > >>