diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-15 23:48:59 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-15 23:48:59 +0000 |
commit | 87ff4b24ae4911bda46a5426024959c278da69b2 (patch) | |
tree | 4598a48b30055b1824cadc12354c3d4e259a07f8 /ext/fiddle/lib/fiddle.rb | |
parent | 8977d3e30c225ba17e6ed542875b320d3d8bd3e1 (diff) | |
download | ruby-87ff4b24ae4911bda46a5426024959c278da69b2.tar.gz |
* ext/.document (fiddle): Remove duplicate entry
* ext/fiddle: Complete documentation of Fiddle. Patch by Vincent
Batts. [#5192]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/fiddle/lib/fiddle.rb')
-rw-r--r-- | ext/fiddle/lib/fiddle.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/fiddle/lib/fiddle.rb b/ext/fiddle/lib/fiddle.rb index 8b8c069b03..7d55a1f7ad 100644 --- a/ext/fiddle/lib/fiddle.rb +++ b/ext/fiddle/lib/fiddle.rb @@ -4,22 +4,29 @@ require 'fiddle/closure' require 'dl' unless Object.const_defined?(:DL) module Fiddle + + # A reference to DL::CPtr Pointer = DL::CPtr if WINDOWS + # Returns the last win32 +Error+ of the current executing +Thread+ or nil + # if none def self.win32_last_error Thread.current[:__FIDDLE_WIN32_LAST_ERROR__] end + # Sets the last win32 +Error+ of the current executing +Thread+ to +error+ def self.win32_last_error= error Thread.current[:__FIDDLE_WIN32_LAST_ERROR__] = error end end + # Returns the last +Error+ of the current executing +Thread+ or nil if none def self.last_error Thread.current[:__FIDDLE_LAST_ERROR__] end + # Sets the last +Error+ of the current executing +Thread+ to +error+ def self.last_error= error Thread.current[:__DL2_LAST_ERROR__] = error Thread.current[:__FIDDLE_LAST_ERROR__] = error |