33件ヒット
[1-33件を表示]
(0.022秒)
検索結果
-
Fiddle
:: Pointer . malloc(size , free = nil) -> Fiddle :: Pointer (21224.0) -
与えられた長さ size のメモリ領域を確保し、それを表す Pointer オブジェクトを生成して返します。
...さ size のメモリ領域を確保し、それを表す Pointer オブジェクトを生成して返します。
@param size 確保したいメモリ領域のサイズを整数で指定します。
@param free GC 時に呼ばれる Pointer オブジェクトの free 関数を
Fiddle::Fun... -
fiddle (36.0)
-
*.dllや*.soなど、ダイナミックリンクライブラリを扱うためのライブラリです。
..."long tv_usec"])
end
timeval = M::Timeval.malloc
e = M.gettimeofday(timeval, nil)
if e == 0
p timeval.tv_sec #=> 1173519547
end
上の例で、メモリの割り当てに M::Timeval.new ではなく
M::Timeval.malloc を使用していることに注意してください。......ブロックを呼ぶ Fiddle::Function オブジェクトです。
==== ポインタを扱う
fiddle においては、文字列/整数/Fiddle::Pointerをポインタとして
扱うことができます。
文字列をポインタ引数として渡すと文字列のメモリ領域を指す
ポ......引数の変換は以下の通りです。
: void* (つまり任意のポインタ型)
nil ならば C の NULL に変換されます
Fiddle::Pointer は保持している C ポインタに変換されます。
文字列であればその先頭ポインタになります。
IO オブジェ... -
ruby 1
. 8 . 4 feature (30.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...: File.join [bug]
#Wed Oct 19 08:28:32 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * file.c (rb_file_join): elements may contain null pointer strings.
# report and fixed by Lloyd Zusman (hippoman): [ruby-core:06326]
NULLポインタを持つStringを渡すとFile.joinがSEG......ext/openssl/extconf.rb: check for X509V3_EXT_nconf_nid.
#
# * ext/openssl/ossl_x509ext.c (MakeX509ExtFactory): should use
# OPENSSL_malloc to allocate X509V3_CTX.
#
# * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): use
# X509V3_EXT_nconf_nid to avoid SEGV......1.62)
# [ruby-dev:27839]
#
# * ext/syck/syck.h (S_FREE): small hack. no need to check if pointer is
# NULL or not before S_FREE.
#
# * st.c: uses malloc instead of xmalloc to avoid GC. syck uses st_insert
# in gram.c to insert node from rb_syck_bad_anchor_handler...