Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
require 'fiddle' require 'fiddle/pack' require_relative 'c_pointer' module RubyVM::MJIT # :nodoc: all module CType module Struct # @param name [String] # @param members [Hash{ Symbol => [Integer, RubyVM::MJIT::CType::*] }] def self.new(name, sizeof, **members) name = members.keys.join('_') if name.empty? CPointer.with_class_name('Struct', name) do CPointer::Struct.define(sizeof, members) end end end module Union # @param name [String] # @param members [Hash{ Symbol => RubyVM::MJIT::CType::* }] def self.new(name, sizeof, **members) name = members.keys.join('_') if name.empty? CPointer.with_class_name('Union', name) do CPointer::Union.define(sizeof, members) end end end module Immediate # @param fiddle_type [Integer] def self.new(fiddle_type) name = Fiddle.constants.find do |const| const.start_with?('TYPE_') && Fiddle.const_get(const) == fiddle_type.abs end&.to_s name.delete_prefix!('TYPE_') if fiddle_type.negative? name.prepend('U') end CPointer.with_class_name('Immediate', name, cache: true) do CPointer::Immediate.define(fiddle_type) end end # @param type [String] def self.parse(ctype) new(Fiddle::Importer.parse_ctype(ctype)) end def self.find(size, signed) fiddle_type = TYPE_MAP.fetch(size) fiddle_type = -fiddle_type unless signed new(fiddle_type) end TYPE_MAP = Fiddle::PackInfo::SIZE_MAP.map { |type, size| [size, type.abs] }.to_h private_constant :TYPE_MAP end module Bool def self.new CPointer::Bool end end class Pointer # This takes a block to avoid "stack level too deep" on a cyclic reference # @param block [Proc] def self.new(&block) CPointer.with_class_name('Pointer', block.object_id.to_s) do CPointer::Pointer.define(block) end end end module BitField # @param width [Integer] # @param offset [Integer] def self.new(width, offset) CPointer.with_class_name('BitField', "#{offset}_#{width}") do CPointer::BitField.define(width, offset) end end end # Types that are referenced but not part of code generation targets Stub = ::Struct.new(:name) # Types that it failed to figure out from the header Unknown = Module.new end end