diff --git a/basis/alien/syntax/syntax.factor b/basis/alien/syntax/syntax.factor index b5f8780111..3a45edd03f 100644 --- a/basis/alien/syntax/syntax.factor +++ b/basis/alien/syntax/syntax.factor @@ -24,15 +24,6 @@ IN: alien.syntax PRIVATE> -: indirect-quot ( function-ptr-quot return types abi -- quot ) - [ alien-indirect ] 3curry compose ; - -: define-indirect ( abi return function-ptr-quot function-name parameters -- ) - [ pick ] dip parse-arglist - rot create-in dup reset-generic - [ swapd roll indirect-quot ] dip - -rot define-declared ; - : DLL" lexer get skip-blank parse-string dlopen parsed ; parsing : ALIEN: scan string>number parsed ; parsing diff --git a/basis/opengl/gl/extensions/extensions.factor b/basis/opengl/gl/extensions/extensions.factor index fd547c8b5a..02b1a9a623 100644 --- a/basis/opengl/gl/extensions/extensions.factor +++ b/basis/opengl/gl/extensions/extensions.factor @@ -1,6 +1,6 @@ -USING: alien alien.syntax combinators kernel parser sequences -system words namespaces hashtables init math arrays assocs -continuations lexer ; +USING: alien alien.syntax alien.syntax.private combinators +kernel parser sequences system words namespaces hashtables init +math arrays assocs continuations lexer ; IN: opengl.gl.extensions ERROR: unknown-gl-platform ; @@ -36,6 +36,15 @@ reset-gl-function-number-counter +gl-function-pointers+ get-global set-at ] if* ; +: indirect-quot ( function-ptr-quot return types abi -- quot ) + [ alien-indirect ] 3curry compose ; + +: define-indirect ( abi return function-ptr-quot function-name parameters -- ) + [ pick ] dip parse-arglist + rot create-in + [ swapd roll indirect-quot ] 2dip + -rot define-declared ; + : GL-FUNCTION: gl-function-calling-convention scan