X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=basis%2Falien%2Fparser%2Fparser.factor;fp=basis%2Falien%2Fparser%2Fparser.factor;h=8d850c47eea8500b6542452ae16fb063c0770cb4;hp=d073a4caac2b9f863f394c7f6db4e777e206b098;hb=833372cd0802184757240b3948e816de45241e8e;hpb=9c3f3a5a432cea23d809121037cef7f30ac2d324 diff --git a/basis/alien/parser/parser.factor b/basis/alien/parser/parser.factor index d073a4caac..8d850c47ee 100644 --- a/basis/alien/parser/parser.factor +++ b/basis/alien/parser/parser.factor @@ -66,16 +66,16 @@ IN: alien.parser 2 group [ first2 normalize-c-arg 2array ] map unzip [ "," ?tail drop ] map ] - [ dup "void" = [ drop { } ] [ 1array ] if ] + [ [ { } ] [ name>> 1array ] if-void ] bi* ; : function-quot ( return library function types -- quot ) '[ _ _ _ _ alien-invoke ] ; :: make-function ( return library function parameters -- word quot effect ) - return function normalize-c-arg :> ( return-c-type function ) + return function normalize-c-arg :> ( return function ) function create-in dup reset-generic - return-c-type library function + return library function parameters return parse-arglist [ function-quot ] dip ; : parse-arg-tokens ( -- tokens ) @@ -88,10 +88,7 @@ IN: alien.parser 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-c-type type-name ) @@ -115,4 +112,3 @@ PREDICATE: alien-function-word < word PREDICATE: alien-callback-type-word < typedef-word "callback-effect" word-prop ; -