     [ '[ ,                   [ swap 2array ] curry map ] ] bi bi*
     swap append ;
 
-: compile-alien-callback ( word return parameters abi quot -- alien )
+: compile-alien-callback ( word return parameters abi quot -- word )
     '[ , , , , alien-callback ]
     [ [ (( -- alien )) define-declared ] pick slip ]
-    with-compilation-unit
-    execute ;
+    with-compilation-unit ;
 
-: (byte-array-to-malloced-buffer) ( byte-array -- alien )
+: byte-array>malloc ( byte-array -- alien )
     [ byte-length malloc ] [ over byte-array>memory ] bi ;
 
 : (callback-word) ( function-name interface-name counter -- word )

    [ dup empty? [ 2drop [ ] ] [ swap 1- '[ , , ndip ] ] if ]
    dip compose ;

: (make-vtbl) ( interface-name quots iunknown-methods n -- vtbl )
    (thunk) (thunked-quots)
    swap [ find-com-interface-definition family-tree-functions ]
    keep (next-vtbl-counter) '[

            first2 (finish-thunk)
        ] bi*
        "stdcall" swap compile-alien-callback
    ] 2map ;

: (make-callbacks) ( implementations -- sequence )
    dup [ first ] map (make-iunknown-methods)
    [ >r >r first2 r> r> swap (make-interface-callbacks) ]
    curry map-index ;

: (malloc-wrapped-object) ( wrapper -- wrapped-object )
    vtbls>> length "void*" heap-size *
