summaryrefslogtreecommitdiff
path: root/ext/fiddle/lib/fiddle.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 05:59:34 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 05:59:34 +0000
commit1eac1cb21ebb095886393ee71acd0ed8f6dedab8 (patch)
tree5200317a05b1ae0a676f02ff206f2b5dc6b10b87 /ext/fiddle/lib/fiddle.rb
parent1d8d7a3eec54a5440a1942c0b589c228138834ae (diff)
reverting r37881
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/fiddle/lib/fiddle.rb')
-rw-r--r--ext/fiddle/lib/fiddle.rb16
1 files changed, 5 insertions, 11 deletions
diff --git a/ext/fiddle/lib/fiddle.rb b/ext/fiddle/lib/fiddle.rb
index 1c68b7b..7d55a1f 100644
--- a/ext/fiddle/lib/fiddle.rb
+++ b/ext/fiddle/lib/fiddle.rb
@@ -1,8 +1,13 @@
require 'fiddle.so'
require 'fiddle/function'
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
@@ -26,15 +31,4 @@ module Fiddle
Thread.current[:__DL2_LAST_ERROR__] = error
Thread.current[:__FIDDLE_LAST_ERROR__] = error
end
-
- def dlopen library
- Fiddle::Handle.new library
- end
- module_function :dlopen
-
- # Add constants for backwards compat
-
- RTLD_GLOBAL = Handle::RTLD_GLOBAL # :nodoc:
- RTLD_LAZY = Handle::RTLD_LAZY # :nodoc:
- RTLD_NOW = Handle::RTLD_NOW # :nodoc:
end