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