Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More refactoring.

  • Loading branch information...
commit ae59af0ddd2164eb5482f3d4874ee5a4ee97aa4e 1 parent 053af0b
Paul Brannan authored
Showing with 5 additions and 8 deletions.
  1. +5 −8 lib/ludicrous/scope.rb
View
13 lib/ludicrous/scope.rb
@@ -205,13 +205,8 @@ def self.mark_function
# scope.
MARK_CLOSURE = MARK_FUNCTION.to_closure
-
- JIT::Context.build do |context|
- signature = JIT::Type.create_signature(
- JIT::ABI::CDECL,
- JIT::Type::VOID,
- [ JIT::Type::VOID_PTR ])
- FREE_FUNCTION = JIT::Function.compile(context, signature) do |f|
+ def self.free_function
+ return JIT::Function.build(context, [ :VOID_PTR ] => :VOID) do |f|
ptr = f.get_param(0)
# f.debug_print_msg("Freeing scope")
# f.debug_print_uint(ptr)
@@ -220,7 +215,9 @@ def self.mark_function
end
end
- FREE_CLOSURE = FREE_FUNCTION.to_closure
+ # FREE_FUNCTION = free_function()
+ # FREE_CLOSURE = FREE_FUNCTION.to_closure
+ FREE_CLOSURE = Ludicrous.function_pointer_of(:ruby_xfree),
# Create a new inner scope from an outer scope, for use with
# +rb_iterate+.
Please sign in to comment.
Something went wrong with that request. Please try again.