make-function define-declared ;
: callback-quot ( return types abi -- quot )
- [ [ ] 3curry dip alien-callback ] 3curry ;
-
- : library-abi ( lib -- abi )
- library [ abi>> ] [ "cdecl" ] if* ;
+ '[ [ _ _ _ ] dip alien-callback ] ;
:: make-callback-type ( lib return type-name parameters -- word quot effect )
- return type-name normalize-c-arg :> ( return type-name )
+ return type-name normalize-c-arg :> ( return-c-type type-name )
type-name current-vocab create :> type-word
type-word [ reset-generic ] [ reset-c-type ] bi
void* type-word typedef