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