From be9bc3115f785df818383733721e8d0cc62c3229 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 21 Nov 2007 03:17:24 -0500 Subject: [PATCH] Add init hook for callbacks hash --- core/alien/c-types/c-types.factor | 0 core/alien/compiler/compiler.factor | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 core/alien/c-types/c-types.factor diff --git a/core/alien/c-types/c-types.factor b/core/alien/c-types/c-types.factor old mode 100644 new mode 100755 diff --git a/core/alien/compiler/compiler.factor b/core/alien/compiler/compiler.factor index 992c7763f2..7495be42ca 100755 --- a/core/alien/compiler/compiler.factor +++ b/core/alien/compiler/compiler.factor @@ -5,7 +5,8 @@ hashtables kernel math namespaces sequences words inference.backend inference.dataflow system math.parser classes alien.arrays alien.c-types alien.structs alien.syntax cpu.architecture alien inspector quotations assocs -kernel.private threads continuations.private libc combinators ; +kernel.private threads continuations.private libc combinators +init ; IN: alien.compiler ! Common protocol for alien-invoke/alien-callback/alien-indirect @@ -301,7 +302,7 @@ M: alien-indirect generate-node ! this hashtable, they will all be blown away by code GC, beware SYMBOL: callbacks -H{ } clone callbacks set-global +[ H{ } clone callbacks set-global ] "alien.compiler" add-init-hook : register-callback ( word -- ) dup callbacks get set-at ;