本文簡要介紹ruby語言中 Fiddle::Handle.new
的用法。
用法
new(library = nil, flags = Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL)
創建一個使用 flags
打開 library
的新處理程序。
如果沒有指定library
或給出nil
,則使用 DEFAULT
,相當於RTLD_DEFAULT。有關更多信息,請參見man 3 dlopen
。
lib = Fiddle::Handle.new
默認值取決於操作係統,並為所有已加載的庫提供句柄。例如,在大多數情況下,您可以使用它來訪問 libc
函數,或像 rb_str_new
這樣的 ruby 函數。
相關用法
- Ruby Handler.start_sequence用法及代碼示例
- Ruby Handler.start_mapping用法及代碼示例
- Ruby Handle類用法及代碼示例
- Ruby Handler.scalar用法及代碼示例
- Ruby Handler.start_document用法及代碼示例
- Ruby Handler.end_document用法及代碼示例
- Ruby Handler.alias用法及代碼示例
- Ruby Hash.reject用法及代碼示例
- Ruby Hash shift()用法及代碼示例
- Ruby Hash.delete()用法及代碼示例
- Ruby Hash length()用法及代碼示例
- Ruby Hash.new用法及代碼示例
- Ruby Hash.size用法及代碼示例
- Ruby Hash rehash用法及代碼示例
- Ruby Hash.delete用法及代碼示例
- Ruby Hash.hash <=用法及代碼示例
- Ruby Hash size()用法及代碼示例
- Ruby Hash each_pair()用法及代碼示例
- Ruby Hash.select!用法及代碼示例
- Ruby Hash value?用法及代碼示例
- Ruby Hash values用法及代碼示例
- Ruby Hash.ruby2_keywords_hash用法及代碼示例
- Ruby Hash.rassoc(obj)用法及代碼示例
- Ruby Hash.to_s用法及代碼示例
- Ruby Hash.values_at()用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 Handle.new。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。