Fix for native I/O backends that create callbacks in deployed apps; this affected tools.deploy.test[35] ever since run-loop multiplexer landed on OS X
parent
f5395a9c1e
commit
a91dee7810
|
@ -61,12 +61,6 @@ TUPLE: alien-callback-params < alien-node-params quot xt ;
|
|||
! Quotation which coerces return value to required type
|
||||
return-prep-quot infer-quot-here ;
|
||||
|
||||
! Callbacks are registered in a global hashtable. If you clear
|
||||
! this hashtable, they will all be blown away by code GC, beware
|
||||
SYMBOL: callbacks
|
||||
|
||||
[ H{ } clone callbacks set-global ] "alien.compiler" add-init-hook
|
||||
|
||||
: register-callback ( word -- ) callbacks get conjoin ;
|
||||
|
||||
: callback-bottom ( params -- )
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
! Copyright (C) 2004, 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors assocs kernel math namespaces sequences system
|
||||
kernel.private byte-arrays arrays ;
|
||||
kernel.private byte-arrays arrays init ;
|
||||
IN: alien
|
||||
|
||||
! Some predicate classes used by the compiler for optimization
|
||||
|
@ -72,3 +72,9 @@ ERROR: alien-invoke-error library symbol ;
|
|||
|
||||
: alien-invoke ( ... return library function parameters -- ... )
|
||||
2over alien-invoke-error ;
|
||||
|
||||
! Callbacks are registered in a global hashtable. If you clear
|
||||
! this hashtable, they will all be blown away by code GC, beware.
|
||||
SYMBOL: callbacks
|
||||
|
||||
[ H{ } clone callbacks set-global ] "alien" add-init-hook
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: init kernel system namespaces io io.encodings
|
||||
io.encodings.utf8 init assocs splitting ;
|
||||
io.encodings.utf8 init assocs splitting alien ;
|
||||
IN: io.backend
|
||||
|
||||
SYMBOL: io-backend
|
||||
|
@ -32,5 +32,7 @@ M: object normalize-directory normalize-path ;
|
|||
io-backend set-global init-io init-stdio
|
||||
"io.files" init-hooks get at call ;
|
||||
|
||||
! Note that we have 'alien' in our using list so that the alien
|
||||
! init hook runs before this one.
|
||||
[ init-io embedded? [ init-stdio ] unless ]
|
||||
"io.backend" add-init-hook
|
||||
|
|
Loading…
Reference in New Issue