summaryrefslogtreecommitdiff
path: root/ext/dl/lib/dl/import.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-16 00:34:51 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-16 00:34:51 +0000
commitde6d4f7e7bdb78e5cb443a2e327265b52cde0d44 (patch)
tree7252478a71b4a14c2d8f594aaed1ce0757129a85 /ext/dl/lib/dl/import.rb
parent87ff4b24ae4911bda46a5426024959c278da69b2 (diff)
* ext/dl: Add documentation. Patch by Vincent Batts. [Ruby 1.9 - Bug #5192]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/lib/dl/import.rb')
-rw-r--r--ext/dl/lib/dl/import.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/dl/lib/dl/import.rb b/ext/dl/lib/dl/import.rb
index f22a53aa84f..eec65cdfd6d 100644
--- a/ext/dl/lib/dl/import.rb
+++ b/ext/dl/lib/dl/import.rb
@@ -31,6 +31,22 @@ module DL
end
end
+ # DL::Importer includes the means to dynamically load libraries and build
+ # modules around them including calling extern functions within the C
+ # library that has been loaded.
+ #
+ # == Example
+ #
+ # require 'dl'
+ # require 'dl/import'
+ #
+ # module LibSum
+ # extend DL::Importer
+ # dlload './libsum.so'
+ # extern 'double sum(double*, int)'
+ # extern 'double split(double)'
+ # end
+ #
module Importer
include DL
include CParser