] with-file-vocabs
-FUNCTION: void* alien-parser-effect-test ( int *arg1 float arg2 ) ;
+FUNCTION: void* alien-parser-function-effect-test ( int *arg1 float arg2 ) ;
[ (( arg1 arg2 -- void* )) ] [
- \ alien-parser-effect-test "declared-effect" word-prop
+ \ alien-parser-function-effect-test "declared-effect" word-prop
+] unit-test
+
+CALLBACK: void* alien-parser-callback-effect-test ( int *arg1 float arg2 ) ;
+[ (( arg1 arg2 -- void* )) ] [
+ \ alien-parser-callback-effect-test "callback-effect" word-prop
] unit-test
! Reported by mnestic
: library-abi ( lib -- abi )
library [ abi>> ] [ "cdecl" ] if* ;
-:: make-callback-type ( lib return! type-name! parameters -- word quot effect )
- return type-name normalize-c-arg type-name! return!
+:: make-callback-type ( lib return type-name parameters -- word quot effect )
+ 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
parameters return parse-arglist :> ( types callback-effect )
type-word callback-effect "callback-effect" set-word-prop
type-word lib "callback-library" set-word-prop
- type-word return types lib library-abi callback-quot (( quot -- alien )) ;
+ type-word return-c-type types lib library-abi callback-quot (( quot -- alien )) ;
: (CALLBACK:) ( -- word quot effect )
"c-library" get