Skip to content

Instantly share code, notes, and snippets.

@teleological
Created April 29, 2011 13:36
Show Gist options
  • Save teleological/948301 to your computer and use it in GitHub Desktop.
Save teleological/948301 to your computer and use it in GitHub Desktop.
FFI internals 3
module RubyInternals
attach_function :const_def_pointer, :rb_define_const,
[:pointer, :string, :pointer], :void
attach_variable :ptr_object_class, :rb_cObject, :pointer
const_def_pointer(ptr_object_class, "RubyCore", ptr_vm_core)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment