Add init hook for callbacks hash
							parent
							
								
									48026c7d8d
								
							
						
					
					
						commit
						be9bc3115f
					
				| 
						 | 
				
			
			@ -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 ;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue