class Google::Protobuf::Internal::Arena
Public Class Methods
from_native(value, _)
click to toggle source
@param value [::FFI::Pointer] Arena
pointer to be wrapped @param _ [Object] Unused
# File lib/google/protobuf/ffi/internal/arena.rb, line 31 def from_native(value, _) new(value) end
new(pointer)
click to toggle source
# File lib/google/protobuf/ffi/internal/arena.rb, line 36 def initialize(pointer) @arena = ::FFI::AutoPointer.new(pointer, Google::Protobuf::FFI.method(:free_arena)) @pinned_messages = [] end
Public Instance Methods
fuse(other_arena)
click to toggle source
# File lib/google/protobuf/ffi/internal/arena.rb, line 41 def fuse(other_arena) return if other_arena == self unless Google::Protobuf::FFI.fuse_arena(self, other_arena) raise RuntimeError.new "Unable to fuse arenas. This should never happen since Ruby does not use initial blocks" end end