From 87ff4b24ae4911bda46a5426024959c278da69b2 Mon Sep 17 00:00:00 2001 From: drbrain Date: Mon, 15 Aug 2011 23:48:59 +0000 Subject: * 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 --- ext/fiddle/lib/fiddle.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ext/fiddle/lib/fiddle.rb') 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 -- cgit v1.2.3