class RbSDL2::RWOperator::SizeCallback

Public Class Methods

new(obj) click to toggle source
Calls superclass method
# File lib/rb_sdl2/rw_ops/rw_operator.rb, line 47
def initialize(obj)
  # Sint64 (* size) (struct SDL_RWops * context);
  super(:int64, [:pointer]) do |_context|
    # 不明な時は -1。Ruby では size が不明確なオブジェクトは size メソッドがないだろう。
    obj.size rescue -1
  end
end