]> gitweb.factorcode.org Git - factor.git/commitdiff
Remove usages of <void*> and *void*
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 25 Oct 2010 18:22:50 +0000 (13:22 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 25 Oct 2010 18:22:50 +0000 (13:22 -0500)
28 files changed:
basis/alien/c-types/c-types-docs.factor
basis/compiler/tests/intrinsics.factor
basis/environment/unix/unix.factor
basis/game/input/dinput/dinput.factor
basis/io/directories/unix/linux/linux.factor
basis/io/directories/unix/unix.factor
basis/io/files/info/unix/macosx/macosx.factor
basis/io/launcher/windows/windows.factor
basis/io/sockets/sockets.factor
basis/io/sockets/windows/windows.factor
basis/iokit/iokit.factor
basis/unix/groups/groups.factor
basis/unix/utilities/utilities.factor
basis/windows/com/syntax/syntax.factor
basis/windows/uniscribe/uniscribe.factor
basis/x11/clipboard/clipboard.factor
extra/audio/vorbis/vorbis.factor
extra/cuda/contexts/contexts.factor
extra/cuda/gl/gl.factor
extra/cuda/libraries/libraries.factor
extra/javascriptcore/javascriptcore.factor
extra/llvm/jit/jit.factor
extra/llvm/reader/reader.factor
extra/llvm/wrappers/wrappers.factor
extra/openal/alut/macosx/macosx.factor
extra/openal/alut/other/other.factor
extra/opencl/ffi/ffi-tests.factor
extra/opencl/opencl.factor

index 8643ae8072597f0c71f28e98cd6ff656fa076afd..5970f701fb7cbac892ab366a172b936c4b9a7810 100644 (file)
@@ -124,8 +124,7 @@ $nl
 "To wrap Factor data for consumption by the FFI, we use a utility word that constructs a byte array of the correct size and converts the Factor object to a C value stored into that byte array:"
 { $subsections <ref> }
 "You call the out parameter constructor with the required initial value, then pass the byte array to the C function, which receives a pointer to the start of the byte array's data area. The C function then returns, leaving the result in the byte array; you read it back using this word:"
-{ $subsections deref }
-"Note that while structure and union types do not get these words defined for them, there is no loss of generality since " { $link <void*> } " and " { $link *void* } " may be used." ;
+{ $subsections deref } ;
 
 ARTICLE: "c-types.primitives" "Primitive C types"
 "The following numerical types are defined in the " { $vocab-link "alien.c-types" } " vocabulary; a " { $snippet "u" } " prefix denotes an unsigned type:"
index b217d1b57e517698019bc3a932599fb0459e9422..3cc7447fb2a11033c0fba83bb087913be5a878de 100644 (file)
@@ -430,15 +430,15 @@ ERROR: bug-in-fixnum* x y a b ;
 [ ] [ "hello world" ascii malloc-string "s" set ] unit-test
 
 "s" get [
-    [ "hello world" ] [ "s" get <void*> [ { byte-array } declare *void* ] compile-call ascii alien>string ] unit-test
-    [ "hello world" ] [ "s" get <void*> [ { c-ptr } declare *void* ] compile-call ascii alien>string ] unit-test
+    [ "hello world" ] [ "s" get <void*> [ { byte-array } declare void* deref ] compile-call ascii alien>string ] unit-test
+    [ "hello world" ] [ "s" get <void*> [ { c-ptr } declare void* deref ] compile-call ascii alien>string ] unit-test
 
     [ ] [ "s" get free ] unit-test
 ] when
 
-[ ALIEN: 1234 ] [ ALIEN: 1234 [ { alien } declare <void*> ] compile-call *void* ] unit-test
-[ ALIEN: 1234 ] [ ALIEN: 1234 [ { c-ptr } declare <void*> ] compile-call *void* ] unit-test
-[ f ] [ f [ { POSTPONE: f } declare <void*> ] compile-call *void* ] unit-test
+[ ALIEN: 1234 ] [ ALIEN: 1234 [ { alien } declare <void*> ] compile-call void* deref ] unit-test
+[ ALIEN: 1234 ] [ ALIEN: 1234 [ { c-ptr } declare <void*> ] compile-call void* deref ] unit-test
+[ f ] [ f [ { POSTPONE: f } declare void* <ref> ] compile-call void* deref ] unit-test
 
 [ 252 ] [ B{ 1 2 3 -4 5 } 3 [ { byte-array fixnum } declare alien-unsigned-1 ] compile-call ] unit-test
 [ -4 ] [ B{ 1 2 3 -4 5 } 3 [ { byte-array fixnum } declare alien-signed-1 ] compile-call ] unit-test
@@ -446,20 +446,20 @@ ERROR: bug-in-fixnum* x y a b ;
 [ -100 ] [ -100 char <ref> [ { byte-array } declare char deref ] compile-call ] unit-test
 [ 156 ] [ -100 uchar <ref> [ { byte-array } declare uchar deref ] compile-call ] unit-test
 
-[ -100 ] [ -100 \ <char> def>> [ { fixnum } declare ] prepend compile-call char deref ] unit-test
-[ 156 ] [ -100 \ <uchar> def>> [ { fixnum } declare ] prepend compile-call uchar deref ] unit-test
+[ -100 ] [ -100 [ char <ref> ] [ { fixnum } declare ] prepend compile-call char deref ] unit-test
+[ 156 ] [ -100 [ uchar <ref> ] [ { fixnum } declare ] prepend compile-call uchar deref ] unit-test
 
 [ -1000 ] [ -1000 short <ref> [ { byte-array } declare short deref ] compile-call ] unit-test
 [ 64536 ] [ -1000 ushort <ref> [ { byte-array } declare ushort deref ] compile-call ] unit-test
 
-[ -1000 ] [ -1000 \ <short> def>> [ { fixnum } declare ] prepend compile-call short deref ] unit-test
-[ 64536 ] [ -1000 \ <ushort> def>> [ { fixnum } declare ] prepend compile-call ushort deref ] unit-test
+[ -1000 ] [ -1000 [ short <ref> ] [ { fixnum } declare ] prepend compile-call short deref ] unit-test
+[ 64536 ] [ -1000 [ ushort <ref> ] [ { fixnum } declare ] prepend compile-call ushort deref ] unit-test
 
 [ -100000 ] [ -100000 int <ref> [ { byte-array } declare int deref ] compile-call ] unit-test
 [ 4294867296 ] [ -100000 uint <ref> [ { byte-array } declare uint deref ] compile-call ] unit-test
 
-[ -100000 ] [ -100000 \ <int> def>> [ { fixnum } declare ] prepend compile-call int deref ] unit-test
-[ 4294867296 ] [ -100000 \ <uint> def>> [ { fixnum } declare ] prepend compile-call uint deref ] unit-test
+[ -100000 ] [ -100000 [ int <ref> ] [ { fixnum } declare ] prepend compile-call int deref ] unit-test
+[ 4294867296 ] [ -100000 [ uint <ref> ] [ { fixnum } declare ] prepend compile-call uint deref ] unit-test
 
 [ t ] [ pi pi double <ref> double deref = ] unit-test
 
index ec41e919d8e2ce9157ad4930481cfca12fcc86e4..abfa15b5ed82dc2d61d0a88cfff11e2802a8eb97 100644 (file)
@@ -17,7 +17,7 @@ M: unix set-os-env ( value key -- ) swap 1 setenv io-error ;
 M: unix unset-os-env ( key -- ) unsetenv io-error ;
 
 M: unix (os-envs) ( -- seq )
-    environ *void* utf8 alien>strings ;
+    environ void* deref utf8 alien>strings ;
 
 : set-void* ( value alien -- ) 0 set-alien-cell ;
 
index 61216fb3170d3e0234dfb3a087a5f349d5eedaf9..26076c8a7e6ddd8e885aa65b29983637da6d019f 100755 (executable)
@@ -23,15 +23,15 @@ SYMBOLS: +dinput+ +keyboard-device+ +keyboard-state+
 
 : create-dinput ( -- )
     f GetModuleHandle DIRECTINPUT_VERSION IDirectInput8W-iid
-    f <void*> [ f DirectInput8Create ole32-error ] keep *void*
+    f void* <ref> [ f DirectInput8Create ole32-error ] keep void* deref
     +dinput+ set-global ;
 
 : delete-dinput ( -- )
     +dinput+ [ com-release f ] change-global ;
 
 : device-for-guid ( guid -- device )
-    +dinput+ get-global swap f <void*>
-    [ f IDirectInput8W::CreateDevice ole32-error ] keep *void* ;
+    +dinput+ get-global swap f void* <ref>
+    [ f IDirectInput8W::CreateDevice ole32-error ] keep void* deref ;
 
 : set-coop-level ( device -- )
     +device-change-window+ get-global DISCL_BACKGROUND DISCL_NONEXCLUSIVE bitor
index 3d69c5f8908b8d874cb7aa3c92bb7e5d39fa844d..a4d96c5b70e8aeccf819a26aa24285b43f811d30 100644 (file)
@@ -6,6 +6,6 @@ IN: io.directories.unix.linux
 
 M: linux find-next-file ( DIR* -- dirent )
     dirent <struct>
-    f <void*>
+    f void* <ref>
     [ [ readdir64_r ] unix-system-call 0 = [ (io-error) ] unless ] 2keep
-    *void* [ drop f ] unless ;
+    void* deref [ drop f ] unless ;
index 0cc8aaa0e43766f2e508eaebd154e4a33fa61a4e..a175599e015b646cfe1a8b1e100d1450a24797c5 100644 (file)
@@ -37,9 +37,9 @@ HOOK: find-next-file os ( DIR* -- byte-array )
 
 M: unix find-next-file ( DIR* -- byte-array )
     dirent <struct>
-    f <void*>
+    f void* <ref>
     [ readdir_r 0 = [ (io-error) ] unless ] 2keep
-    *void* [ drop f ] unless ;
+    void* deref [ drop f ] unless ;
 
 : dirent-type>file-type ( ch -- type )
     {
index ac5f8c23b1119eac1d0017b3c4bfebffc52894a8..445f16456483bbd6cf143d71732914591957b941 100644 (file)
@@ -13,8 +13,8 @@ TUPLE: macosx-file-system-info < unix-file-system-info
 io-size owner type-id filesystem-subtype ;
 
 M: macosx file-systems ( -- array )
-    f <void*> dup 0 getmntinfo64 dup io-error
-    [ *void* ] dip <direct-statfs64-array>
+    f void* <ref> dup 0 getmntinfo64 dup io-error
+    [ void* deref ] dip <direct-statfs64-array>
     [ f_mntonname>> utf8 alien>string file-system-info ] { } map-as ;
 
 M: macosx new-file-system-info macosx-file-system-info new ;
index 0b58df2e43603fb1777e8a90a18827a8b0831195..4a84064c33b4fb3bcb140e3752b4fc845e9770e5 100755 (executable)
@@ -180,12 +180,12 @@ M: windows wait-for-processes ( -- ? )
     GetCurrentProcess ! source process
     swap handle>> ! handle
     GetCurrentProcess ! target process
-    f <void*> [ ! target handle
+    f void* <ref> [ ! target handle
         DUPLICATE_SAME_ACCESS ! desired access
         TRUE ! inherit handle
         0 ! options
         DuplicateHandle win32-error=0/f
-    ] keep *void* <win32-handle> &dispose ;
+    ] keep void* deref <win32-handle> &dispose ;
 
 ! /dev/null simulation
 : null-input ( -- pipe )
index a1bfd4c6aac60e314ad04db672cb5180ddbffd32..fcdc00d1279e4bc2682c17b3a930bd0edb3b7f77 100644 (file)
@@ -368,8 +368,8 @@ M: inet present
 C: <inet> inet
 
 M: string resolve-host
-    f prepare-addrinfo f <void*>
-    [ getaddrinfo addrinfo-error ] keep *void* addrinfo memory>struct
+    f prepare-addrinfo f void* <ref>
+    [ getaddrinfo addrinfo-error ] keep void* deref addrinfo memory>struct
     [ parse-addrinfo-list ] keep freeaddrinfo ;
 
 M: string with-port <inet> ;
index ec82631f7049a766f33338f0c6e74300582dca3c..ec00626b5151d19e5e0b54f9c5e3c53136a907a9 100755 (executable)
@@ -181,7 +181,8 @@ TUPLE: AcceptEx-args port
     } cleave AcceptEx drop winsock-error ; inline\r
 \r
 : (extract-remote-address) ( lpOutputBuffer dwReceiveDataLength dwLocalAddressLength dwRemoteAddressLength -- sockaddr )\r
-    f <void*> 0 int <ref> f <void*> [ 0 int <ref> GetAcceptExSockaddrs ] keep *void* ;\r
+    f void* <ref> 0 int <ref> f void* <ref>\r
+    [ 0 int <ref> GetAcceptExSockaddrs ] keep void* deref ;\r
 \r
 : extract-remote-address ( AcceptEx -- sockaddr )\r
     [\r
index 4dc493222289aa2ed01b19bc0374ccb6a0b0bb45..c9de6f80355d756d7f94ce52f8498bf1e6a5396a 100644 (file)
@@ -156,9 +156,9 @@ TUPLE: mach-error error-code error-string ;
     io-objects-from-iterator* [ release-io-object ] dip ;
     
 : properties-from-io-object ( o -- o nsdictionary )
-    dup f <void*> [
+    dup f void* <ref> [
         kCFAllocatorDefault kNilOptions
         IORegistryEntryCreateCFProperties mach-error
     ]
-    keep *void* ;
+    keep void* deref ;
 
index 117b60d8f599f61e54428eca14567e2240def5bd..10564a85a6eaf11a59f21ac5d00fa8fe5d231400 100644 (file)
@@ -22,10 +22,10 @@ GENERIC: group-struct ( obj -- group/f )
 
 : (group-struct) ( id -- group-struct id group-struct byte-array length void* )
     [ \ unix.ffi:group <struct> ] dip over 4096
-    [ <byte-array> ] keep f <void*> ;
+    [ <byte-array> ] keep f void* <ref> ;
 
 : check-group-struct ( group-struct ptr -- group-struct/f )
-    *void* [ drop f ] unless ;
+    void* deref [ drop f ] unless ;
 
 M: integer group-struct ( id -- group/f )
     (group-struct)
index 919b2ae8a2eabafebba8722633dbb30dbc8d1b63..cd32c91d3cbab2b0fd7934c28c859fddf32d0d6f 100644 (file)
@@ -8,14 +8,14 @@ IN: unix.utilities
 SPECIALIZED-ARRAY: void*
 
 : more? ( alien -- ? )
-    { [ ] [ *void* ] } 1&& ;
+    { [ ] [ void* deref ] } 1&& ;
 
 : advance ( void* -- void* )
     cell swap <displaced-alien> ;
 
 : alien>strings ( alien encoding -- strings )
     [ [ dup more? ] ] dip
-    '[ [ advance ] [ *void* _ alien>string ] bi ]
+    '[ [ advance ] [ void* deref _ alien>string ] bi ]
     produce nip ;
 
 : strings>alien ( strings encoding -- array )
index dc6a0604fbc0341425d23550a98bf07f5a2496d9..f6380cbf51366d4fa368b34e134d8e9bb49a6096 100644 (file)
@@ -11,7 +11,7 @@ IN: windows.com.syntax
 MACRO: com-invoke ( n return parameters -- )
     [ 2nip length ] 3keep
     '[
-        _ npick *void* _ cell * alien-cell _ _
+        _ npick void* deref _ cell * alien-cell _ _
         stdcall alien-indirect
     ] ;
 
index cde6c11efb48368dea59e67cbde75f0ad0e73071..4c6593f92187709c2ba229e5f94f3c5630ce1a94 100755 (executable)
@@ -42,9 +42,9 @@ TUPLE: script-string < disposable font string metrics ssa size image ;
     f ! piDx
     f ! pTabdef
     f ! pbInClass
-    f <void*> ! pssa
+    f void* <ref> ! pssa
     [ ScriptStringAnalyse ] keep
-    [ ole32-error ] [ |ScriptStringFree *void* ] bi* ;
+    [ ole32-error ] [ |ScriptStringFree void* deref ] bi* ;
 
 : set-dc-colors ( dc font -- )
     [ background>> color>RGB SetBkColor drop ]
@@ -103,7 +103,7 @@ TUPLE: script-string < disposable font string metrics ssa size image ;
 PRIVATE>
 
 M: script-string dispose*
-    ssa>> <void*> ScriptStringFree ole32-error ;
+    ssa>> void* <ref> ScriptStringFree ole32-error ;
 
 SYMBOL: cached-script-strings
 
index 290c3e6aa338be2bdecc4e5b2344d2ab5a55f668..a711da5580306c54aecae134bfe9939f9b9bfcc5 100644 (file)
@@ -28,11 +28,11 @@ TUPLE: x-clipboard atom contents ;
     CurrentTime XConvertSelection drop ;
 
 : snarf-property ( prop-return -- string )
-    dup *void* [ *void* utf8 alien>string ] [ drop f ] if ;
+    dup void* deref [ void* deref utf8 alien>string ] [ drop f ] if ;
 
 : window-property ( win prop delete? -- string )
     [ [ dpy get ] 2dip 0 -1 ] dip AnyPropertyType
-    0 <Atom> 0 int <ref> 0 <ulong> 0 <ulong> f <void*>
+    0 <Atom> 0 int <ref> 0 ulong <ref> 0 ulong <ref> f void* <ref>
     [ XGetWindowProperty drop ] keep snarf-property ;
 
 : selection-from-event ( event window -- string )
index e67c7b7934ebf3a72a05a93d3810301f08af732b..7e69aea7b4256cdb18d4397cdbbf72d4deb849f1 100644 (file)
@@ -157,7 +157,7 @@ ERROR: no-vorbis-in-ogg ;
     [ init-vorbis-codec ] if ;
 
 : get-pending-decoded-audio ( vorbis-stream -- pcm len )
-    dsp-state>> f <void*> [ vorbis_synthesis_pcmout ] keep *void* swap ;
+    dsp-state>> f void* <ref> [ vorbis_synthesis_pcmout ] keep void* deref swap ;
 
 : float>short-sample ( float -- short )
     -32767.5 * 0.5 - >integer -32768 32767 clamp ; inline
index 0ba01cc45350794138b3ccae51777ca944d8898a..714eaab94c60e7d8ba36f30e4db30f85054e2b9e 100644 (file)
@@ -10,7 +10,7 @@ IN: cuda.contexts
 : create-context ( device flags -- context )
     swap
     [ CUcontext <c-object> ] 2dip
-    [ cuCtxCreate cuda-error ] 3keep 2drop *void* ; inline
+    [ cuCtxCreate cuda-error ] 3keep 2drop void* deref ; inline
 
 : sync-context ( -- )
     cuCtxSynchronize cuda-error ; inline
index 6ebee377aa04d09b2d3dc76f14299d98d2e8a45c..78e108ae7a28bc41abf2fcf1f4debe8b81be6b39 100644 (file)
@@ -7,7 +7,7 @@ IN: cuda.gl
 : create-gl-cuda-context ( device flags -- context )
     swap
     [ CUcontext <c-object> ] 2dip
-    [ cuGLCtxCreate cuda-error ] 3keep 2drop *void* ; inline
+    [ cuGLCtxCreate cuda-error ] 3keep 2drop void* deref ; inline
 
 : with-gl-cuda-context ( device flags quot -- )
     [ set-up-cuda-context create-gl-cuda-context ] dip (with-cuda-context) ; inline 
@@ -15,20 +15,20 @@ IN: cuda.gl
 : gl-buffer>resource ( gl-buffer flags -- resource )
     enum>number
     [ CUgraphicsResource <c-object> ] 2dip
-    [ cuGraphicsGLRegisterBuffer cuda-error ] 3keep 2drop *void* ; inline
+    [ cuGraphicsGLRegisterBuffer cuda-error ] 3keep 2drop void* deref ; inline
 
 : buffer>resource ( buffer flags -- resource )
     [ handle>> ] dip gl-buffer>resource ; inline
 
 : map-resource ( resource -- device-ptr size )
-    [ 1 swap <void*> f cuGraphicsMapResources cuda-error ] [
+    [ 1 swap void* <ref> f cuGraphicsMapResources cuda-error ] [
         [ CUdeviceptr <c-object> uint <c-object> ] dip
         [ cuGraphicsResourceGetMappedPointer cuda-error ] 3keep drop
         [ uint deref ] [ uint deref ] bi*
     ] bi ; inline
 
 : unmap-resource ( resource -- )
-    1 swap <void*> f cuGraphicsUnmapResources cuda-error ; inline
+    1 swap void* <ref> f cuGraphicsUnmapResources cuda-error ; inline
 
 DESTRUCTOR: unmap-resource
 
index e930745a17d08b23dc3093e2b4182378f96a33c8..0dc404c1cfafeb1eb6e9a0d2032d5c54dd8492f2 100644 (file)
@@ -75,7 +75,7 @@ PRIVATE>
 
 : load-module ( path -- module )
     [ CUmodule <c-object> ] dip
-    [ cuModuleLoad cuda-error ] 2keep drop c:*void* ;
+    [ cuModuleLoad cuda-error ] 2keep drop c:void* c:deref ;
 
 : unload-module ( module -- )
     cuModuleUnload cuda-error ;
@@ -152,7 +152,7 @@ MACRO: cuda-arguments ( c-types abi -- quot: ( args... function -- ) )
 
 : get-function-ptr ( module string -- function )
     [ CUfunction <c-object> ] 2dip
-    [ cuModuleGetFunction cuda-error ] 3keep 2drop c:*void* ;
+    [ cuModuleGetFunction cuda-error ] 3keep 2drop c:void* c:deref ;
 
 : cached-module ( module-name -- alien )
     lookup-cuda-library
index 738f1749bca588a25cfc6e1029b61a22ea13c707..6dff17a43323c2e32fcf098266d0e177bb5cc528 100644 (file)
@@ -38,7 +38,7 @@ SYMBOL: js-context
 : eval-js ( string -- result-string )
     [ js-context get dup ] dip
     JSStringCreateWithUTF8CString f f 0 JSValueRef <c-object>
-    [ JSEvaluateScript ] keep *void*
+    [ JSEvaluateScript ] keep void* deref
     dup [ nip JSValueRef>string javascriptcore-error ] [ drop JSValueRef>string ] if ;
 
 : eval-js-standalone ( string -- result-string )
index fc755fd00fa6c93e48909ffc3054b73aae036096..2c4c0a509fd6ea2b329c543195564211018e1a6d 100644 (file)
@@ -25,9 +25,9 @@ TUPLE: jit ee mps ;
     LLVMGetFirstFunction dup ALIEN: 0 = [ drop ] [ (remove-functions) ] if ;
 
 : remove-provider ( provider -- )
-    current-jit ee>> value>> swap value>> f <void*> f <void*>
-    [ LLVMRemoveModuleProvider drop ] 2keep *void* [ llvm-throw ] when*
-    *void* module new swap >>value
+    current-jit ee>> value>> swap value>> f void* <ref> f void* <ref>
+    [ LLVMRemoveModuleProvider drop ] 2keep void* deref [ llvm-throw ] when*
+    void* deref module new swap >>value
     [ value>> remove-functions ] with-disposal ;
 
 : remove-module ( name -- )
@@ -44,5 +44,5 @@ TUPLE: jit ee mps ;
 
 : function-pointer ( name -- alien )
     current-jit ee>> value>> dup
-    rot f <void*> [ LLVMFindFunction drop ] keep
-    *void* LLVMGetPointerToGlobal ;
\ No newline at end of file
+    rot f void* <ref> [ LLVMFindFunction drop ] keep
+    void* deref LLVMGetPointerToGlobal ;
index 8c324b41e47d736450927b87b6b0891449e1ba0f..176e89b9946e83b12943d92b8561f463572503ce 100644 (file)
@@ -7,9 +7,9 @@ IN: llvm.reader
 
 : buffer>module ( buffer -- module )
     [
-        value>> f <void*> f <void*>
+        value>> f void* <ref> f void* <ref>
         [ LLVMParseBitcode drop ] 2keep
-        *void* [ llvm-throw ] when* *void*
+        void* deref [ llvm-throw ] when* void* deref
         module new swap >>value
     ] with-disposal ;
 
@@ -17,4 +17,4 @@ IN: llvm.reader
     <buffer> buffer>module ;
 
 : load-into-jit ( path name -- )
-    [ load-module ] dip add-module ;
\ No newline at end of file
+    [ load-module ] dip add-module ;
index 05aafce973ead3f82c61e3c38b532f4773817bce..24df1d5a12ea7356bb96a8be313d006ddd775634 100644 (file)
@@ -33,9 +33,9 @@ M: engine dispose* value>> LLVMDisposeExecutionEngine ;
 
 : (engine) ( provider -- engine )
     [
-        value>> f <void*> f <void*>
+        value>> f void* <ref> f void* <ref>
         [ swapd 0 swap LLVMCreateJITCompiler drop ] 2keep
-        *void* [ llvm-throw ] when* *void*
+        void* deref [ llvm-throw ] when* void* deref
     ]
     [ t >>disposed drop ] bi
     engine <dispose> ;
@@ -57,6 +57,6 @@ TUPLE: buffer value disposed ;
 M: buffer dispose* value>> LLVMDisposeMemoryBuffer ;
 
 : <buffer> ( path -- module )
-    f <void*> f <void*>
+    f void* <ref> f void* <ref>
     [ LLVMCreateMemoryBufferWithContentsOfFile drop ] 2keep
-    *void* [ llvm-throw ] when* *void* buffer <dispose> ;
\ No newline at end of file
+    void* deref [ llvm-throw ] when* void* deref buffer <dispose> ;
index e6e8898b93e9174725ccffbea423f5dc33a0cd8b..5380930dd17a29e6965909fcd99ce213387633fa 100755 (executable)
@@ -9,6 +9,6 @@ LIBRARY: alut
 FUNCTION: void alutLoadWAVFile ( c-string fileName, ALenum* format, void** data, ALsizei* size, ALsizei* frequency ) ;
 
 M: macosx load-wav-file ( path -- format data size frequency )
-    0 int <ref> f <void*> 0 int <ref> 0 int <ref>
+    0 int <ref> f void* <ref> 0 int <ref> 0 int <ref>
     [ alutLoadWAVFile ] 4 nkeep
-    [ [ [ int deref ] dip *void* ] dip int deref ] dip int deref ;
+    [ [ [ int deref ] dip void* deref ] dip int deref ] dip int deref ;
index 73b1aca86e04b6c487128f8a8980cd472f8ff3c1..42e6172c9fd4f1c72867f0c6507d4391c9379534 100755 (executable)
@@ -10,8 +10,8 @@ FUNCTION: void alutLoadWAVFile ( c-string fileName, ALenum* format, void** data,
 
 M: object load-wav-file ( filename -- format data size frequency )
     0 int <ref>
-    f <void*>
+    f void* <ref>
     0 int <ref>
     0 int <ref>
     [ 0 char <ref> alutLoadWAVFile ] 4 nkeep
-    { [ int deref ] [ *void* ] [ int deref ] [ int deref ] } spread ;
+    { [ int deref ] [ void* deref ] [ int deref ] [ int deref ] } spread ;
index ab84c07d4916acd0e9b45993b9cbb634b94217ab..60083a0b0a7db596c3339ae996c8491522622ab2 100644 (file)
@@ -31,12 +31,12 @@ ERROR: cl-error err ;
 :: opencl-square ( in -- out )
     0 f 0 uint <ref> [ clGetPlatformIDs cl-success ] keep uint deref
     dup <void*-array> [ f clGetPlatformIDs cl-success ] keep first
-    CL_DEVICE_TYPE_DEFAULT 1 f <void*> [ f clGetDeviceIDs cl-success ] keep *void* :> device-id
-    f 1 device-id <void*> f f 0 int <ref> [ clCreateContext ] keep int deref cl-success   :> context
+    CL_DEVICE_TYPE_DEFAULT 1 f void* <ref> [ f clGetDeviceIDs cl-success ] keep void* deref :> device-id
+    f 1 device-id void* <ref> f f 0 int <ref> [ clCreateContext ] keep int deref cl-success   :> context
     context device-id 0 0 int <ref> [ clCreateCommandQueue ] keep int deref cl-success    :> queue
  
     [
-        context 1 kernel-source cl-string-array <void*>
+        context 1 kernel-source cl-string-array void* <ref>
         f 0 int <ref> [ clCreateProgramWithSource ] keep int deref cl-success
         [ 0 f f f f clBuildProgram cl-success ]
         [ "square" cl-string-array 0 int <ref> [ clCreateKernel ] keep int deref cl-success ]
@@ -51,8 +51,8 @@ ERROR: cl-error err ;
 
     queue input CL_TRUE 0 in byte-length in 0 f f clEnqueueWriteBuffer cl-success
 
-    kernel 0 cl_mem heap-size input <void*> clSetKernelArg cl-success
-    kernel 1 cl_mem heap-size output <void*> clSetKernelArg cl-success
+    kernel 0 cl_mem heap-size input void* <ref> clSetKernelArg cl-success
+    kernel 1 cl_mem heap-size output void* <ref> clSetKernelArg cl-success
     kernel 2 uint heap-size in length uint <ref> clSetKernelArg cl-success
  
     queue kernel 1 f in length ulonglong <ref> f
index 78e96e2ff13df86fa8ffa129180e71431d6fe37f..0fa5db978411706f4c4110a4bcf722a8090e7f1f 100644 (file)
@@ -403,7 +403,7 @@ M: cl-filter-linear  filter-mode-constant drop CL_FILTER_LINEAR ;
     [ clGetEventProfilingInfo ] info-ulong ;
 
 : bind-kernel-arg-buffer ( kernel index buffer -- )
-    [ handle>> ] [ cl_mem heap-size ] [ handle>> <void*> ] tri*
+    [ handle>> ] [ cl_mem heap-size ] [ handle>> void* deref ] tri*
     clSetKernelArg cl-success ; inline
 
 : bind-kernel-arg-data ( kernel index byte-array -- )
@@ -488,7 +488,7 @@ PRIVATE>
         [ [ buffer>> handle>> ] [ offset>> ] bi ]
         tri* swapd
     ] 2dip [ length ] keep [ f ] [ [ handle>> ] void*-array{ } map-as ] if-empty
-    f <void*> [ clEnqueueCopyBuffer cl-success ] keep *void* cl-event
+    f void* <ref> [ clEnqueueCopyBuffer cl-success ] keep void* deref cl-event
     new-disposable swap >>handle ;
 
 : cl-queue-read-buffer ( buffer-range alien dependent-events -- event )
@@ -496,7 +496,7 @@ PRIVATE>
         [ (current-cl-queue) handle>> ] dip
         [ buffer>> handle>> CL_FALSE ] [ offset>> ] [ size>> ] tri
     ] 2dip [ length ] keep [ f ] [ [ handle>> ] void*-array{ } map-as ] if-empty
-    f <void*> [ clEnqueueReadBuffer cl-success ] keep *void* cl-event
+    f void* <ref> [ clEnqueueReadBuffer cl-success ] keep void* <ref> cl-event
     new-disposable swap >>handle ;
 
 : cl-queue-write-buffer ( buffer-range alien dependent-events -- event )
@@ -504,7 +504,7 @@ PRIVATE>
         [ (current-cl-queue) handle>> ] dip
         [ buffer>> handle>> CL_FALSE ] [ offset>> ] [ size>> ] tri
     ] 2dip [ length ] keep [ f ] [ [ handle>> ] void*-array{ } map-as ] if-empty
-    f <void*> [ clEnqueueWriteBuffer cl-success ] keep *void* cl-event
+    f void* <ref> [ clEnqueueWriteBuffer cl-success ] keep void* deref cl-event
     new-disposable swap >>handle ;
 
 : <cl-sampler> ( normalized-coords? addressing-mode filter-mode -- sampler )
@@ -549,7 +549,7 @@ PRIVATE>
     kernel handle>>
     sizes [ length f ] [ [ ] size_t-array{ } map-as f ] bi
     dependent-events [ length ] [ [ f ] [ [ handle>> ] void*-array{ } map-as ] if-empty ] bi
-    f <void*> [ clEnqueueNDRangeKernel cl-success ] keep *void*
+    f void* <ref> [ clEnqueueNDRangeKernel cl-success ] keep void* deref
     cl-event new-disposable swap >>handle ;
 
 : cl-event-type ( event -- command-type )
@@ -573,7 +573,7 @@ PRIVATE>
 
 : cl-marker ( -- event )
     (current-cl-queue)
-    f <void*> [ clEnqueueMarker cl-success ] keep *void* cl-event new-disposable
+    f void* <ref> [ clEnqueueMarker cl-success ] keep void* deref cl-event new-disposable
     swap >>handle ; inline
 
 : cl-barrier ( -- )