Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../opt/alt/ruby22/lib64/ruby/2.2.0
File: fiddle.rb
require 'fiddle.so'
[0] Fix | Delete
require 'fiddle/function'
[1] Fix | Delete
require 'fiddle/closure'
[2] Fix | Delete
[3] Fix | Delete
module Fiddle
[4] Fix | Delete
if WINDOWS
[5] Fix | Delete
# Returns the last win32 +Error+ of the current executing +Thread+ or nil
[6] Fix | Delete
# if none
[7] Fix | Delete
def self.win32_last_error
[8] Fix | Delete
Thread.current[:__FIDDLE_WIN32_LAST_ERROR__]
[9] Fix | Delete
end
[10] Fix | Delete
[11] Fix | Delete
# Sets the last win32 +Error+ of the current executing +Thread+ to +error+
[12] Fix | Delete
def self.win32_last_error= error
[13] Fix | Delete
Thread.current[:__FIDDLE_WIN32_LAST_ERROR__] = error
[14] Fix | Delete
end
[15] Fix | Delete
end
[16] Fix | Delete
[17] Fix | Delete
# Returns the last +Error+ of the current executing +Thread+ or nil if none
[18] Fix | Delete
def self.last_error
[19] Fix | Delete
Thread.current[:__FIDDLE_LAST_ERROR__]
[20] Fix | Delete
end
[21] Fix | Delete
[22] Fix | Delete
# Sets the last +Error+ of the current executing +Thread+ to +error+
[23] Fix | Delete
def self.last_error= error
[24] Fix | Delete
Thread.current[:__DL2_LAST_ERROR__] = error
[25] Fix | Delete
Thread.current[:__FIDDLE_LAST_ERROR__] = error
[26] Fix | Delete
end
[27] Fix | Delete
[28] Fix | Delete
# call-seq: dlopen(library) => Fiddle::Handle
[29] Fix | Delete
#
[30] Fix | Delete
# Creates a new handler that opens +library+, and returns an instance of
[31] Fix | Delete
# Fiddle::Handle.
[32] Fix | Delete
#
[33] Fix | Delete
# If +nil+ is given for the +library+, Fiddle::Handle::DEFAULT is used, which
[34] Fix | Delete
# is the equivalent to RTLD_DEFAULT. See <code>man 3 dlopen</code> for more.
[35] Fix | Delete
#
[36] Fix | Delete
# lib = Fiddle.dlopen(nil)
[37] Fix | Delete
#
[38] Fix | Delete
# The default is dependent on OS, and provide a handle for all libraries
[39] Fix | Delete
# already loaded. For example, in most cases you can use this to access
[40] Fix | Delete
# +libc+ functions, or ruby functions like +rb_str_new+.
[41] Fix | Delete
#
[42] Fix | Delete
# See Fiddle::Handle.new for more.
[43] Fix | Delete
def dlopen library
[44] Fix | Delete
Fiddle::Handle.new library
[45] Fix | Delete
end
[46] Fix | Delete
module_function :dlopen
[47] Fix | Delete
[48] Fix | Delete
# Add constants for backwards compat
[49] Fix | Delete
[50] Fix | Delete
RTLD_GLOBAL = Handle::RTLD_GLOBAL # :nodoc:
[51] Fix | Delete
RTLD_LAZY = Handle::RTLD_LAZY # :nodoc:
[52] Fix | Delete
RTLD_NOW = Handle::RTLD_NOW # :nodoc:
[53] Fix | Delete
end
[54] Fix | Delete
[55] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function