]> gitweb.factorcode.org Git - factor.git/commitdiff
alien.data: remove second quotation parameter from with-out-parameters, now all value...
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Fri, 16 Jul 2010 21:32:05 +0000 (17:32 -0400)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Fri, 16 Jul 2010 21:32:05 +0000 (17:32 -0400)
35 files changed:
basis/alien/arrays/arrays.factor
basis/alien/c-types/c-types.factor
basis/alien/data/data-docs.factor
basis/alien/data/data.factor
basis/checksums/openssl/openssl.factor
basis/cocoa/messages/messages.factor
basis/cocoa/nibs/nibs.factor
basis/cocoa/plists/plists.factor
basis/compiler/tests/alien.factor
basis/compiler/tests/optimizer.factor
basis/core-foundation/strings/strings.factor
basis/core-text/core-text.factor
basis/db/postgresql/lib/lib.factor
basis/db/sqlite/lib/lib.factor
basis/game/input/x11/x11.factor
basis/io/backend/windows/nt/nt.factor
basis/io/backend/windows/nt/privileges/privileges.factor
basis/io/files/info/windows/windows.factor
basis/io/launcher/unix/unix.factor
basis/io/launcher/windows/windows.factor
basis/io/sockets/windows/nt/nt.factor
basis/iokit/iokit.factor
basis/math/vectors/simd/simd-tests.factor
basis/opengl/framebuffers/framebuffers.factor
basis/opengl/opengl.factor
basis/opengl/shaders/shaders.factor
basis/opengl/textures/textures.factor
basis/pango/cairo/cairo.factor
basis/random/windows/windows.factor
basis/ui/backend/cocoa/cocoa.factor
basis/ui/backend/windows/windows.factor
basis/ui/backend/x11/x11.factor
basis/windows/dwmapi/dwmapi.factor
basis/windows/offscreen/offscreen.factor
basis/windows/uniscribe/uniscribe.factor

index 42e40483f6789a79a014058421e6e16ad440ccc1..c020feaa76ec5242eef93e0b4de5eee3464556a5 100644 (file)
@@ -56,6 +56,9 @@ M: string-type c-type-unboxer-quot
 M: string-type c-type-getter
     drop [ alien-cell ] ;
 
+M: string-type c-type-copier
+    drop [ ] ;
+
 M: string-type c-type-setter
     drop [ set-alien-cell ] ;
 
index 412bf9259a89e82cc18654ef99858eac5e91d8ee..389883535fbf3296185390878984d4e03ef2f080 100644 (file)
@@ -89,6 +89,10 @@ GENERIC: c-type-getter ( name -- quot )
 
 M: c-type c-type-getter getter>> ;
 
+GENERIC: c-type-copier ( name -- quot )
+
+M: c-type c-type-copier drop [ ] ;
+
 GENERIC: c-type-setter ( name -- quot )
 
 M: c-type c-type-setter setter>> ;
@@ -118,6 +122,9 @@ MIXIN: value-type
 MACRO: alien-value ( c-type -- quot: ( c-ptr offset -- value ) )
     [ c-type-getter ] [ c-type-boxer-quot ] bi append ;
 
+MACRO: alien-copy-value ( c-type -- quot: ( c-ptr offset -- value ) )
+    [ c-type-getter ] [ c-type-copier ] [ c-type-boxer-quot ] tri 3append ;
+
 MACRO: set-alien-value ( c-type -- quot: ( value c-ptr offset -- ) )
     [ c-type-unboxer-quot [ [ ] ] [ '[ _ 2dip ] ] if-empty ]
     [ c-type-setter ]
@@ -139,6 +146,7 @@ PROTOCOL: c-type-protocol
     c-type-unboxer-quot
     c-type-rep
     c-type-getter
+    c-type-copier
     c-type-setter
     c-type-align
     c-type-align-first
index 930232b86c4d8e421a94d403c78cea4974dfd2f5..02a31976c7fd1f7a6a56fd2af0d016b06002a830 100644 (file)
@@ -76,7 +76,7 @@ scoped-allocation-test ."
 } ;
 
 HELP: with-out-parameters
-{ $values { "c-types" "a list of scoped allocation specifiers" } { "quot" quotation } { "finish" quotation } { "values..." "zero or more values" } }
+{ $values { "c-types" "a list of scoped allocation specifiers" } { "quot" quotation } { "values..." "zero or more values" } }
 { $description "Allocates values on the call stack, calls the quotation, then copies all stack allocated values to the data heap after the quotation returns."
 $nl
 "A scoped allocation specifier is either:"
index ab5824bfd2cce71ff2f24c06e46c162a1621abbb..d755ac387b71ab902df0f2641f11c6e3a13c8cad 100644 (file)
@@ -70,7 +70,10 @@ M: value-type c-type-rep drop int-rep ;
 M: value-type c-type-getter
     drop [ swap <displaced-alien> ] ;
 
-M: value-type c-type-setter ( type -- quot )
+M: value-type c-type-copier
+    heap-size '[ _ memory>byte-array ] ;
+
+M: value-type c-type-setter
     [ c-type-getter ] [ heap-size ] bi '[ @ swap _ memcpy ] ;
 
 M: array c-type-boxer-quot
@@ -117,7 +120,7 @@ MACRO: box-values ( c-types -- quot )
 
 MACRO: out-parameters ( c-types -- quot )
     [ dup hairy-local-allot? [ first ] when ] map
-    [ length ] [ [ '[ 0 _ alien-value ] ] map ] bi
+    [ length ] [ [ '[ 0 _ alien-copy-value ] ] map ] bi
     '[ _ nkeep _ spread ] ;
 
 PRIVATE>
@@ -126,8 +129,8 @@ PRIVATE>
     [ [ (local-allots) ] [ box-values ] bi ] dip call
     (cleanup-allot) ; inline
 
-: with-out-parameters ( c-types quot finish -- values... )
-    [ [ drop (local-allots) ] [ swap out-parameters ] 2bi ] dip call
+: with-out-parameters ( c-types quot -- values... )
+    [ drop (local-allots) ] [ swap out-parameters ] 2bi
     (cleanup-allot) ; inline
 
 GENERIC: binary-zero? ( value -- ? )
@@ -137,4 +140,3 @@ M: f binary-zero? drop t ; inline
 M: integer binary-zero? zero? ; inline
 M: math:float binary-zero? double>bits zero? ; inline
 M: complex binary-zero? >rect [ binary-zero? ] both? ; inline
-
index 1fec109d5f105219ee545c69de34f75cb2e38e2d..41c8537d45820f1976c22a5ecda9673dd08aeaf1 100644 (file)
@@ -48,9 +48,8 @@ M: evp-md-context dispose*
 : digest-value ( ctx -- value )
     handle>>
     { { int EVP_MAX_MD_SIZE } int }
-    [ EVP_DigestFinal_ex ssl-error ]
-    [ memory>byte-array ]
-    with-out-parameters ;
+    [ EVP_DigestFinal_ex ssl-error ] with-out-parameters
+    memory>byte-array ;
 
 PRIVATE>
 
index 029b3f46e6150a4ed41fe96b7d709dc030afa1d0..4d786aaf720f68b395b510e2a516b9513443db46 100644 (file)
@@ -216,7 +216,7 @@ ERROR: no-objc-type name ;
     objc-methods get set-at ;
 
 : each-method-in-class ( class quot -- )
-    [ { uint } [ class_copyMethodList ] [ ] with-out-parameters ] dip
+    [ { uint } [ class_copyMethodList ] with-out-parameters ] dip
     over 0 = [ 3drop ] [
         [ <direct-void*-array> ] dip
         [ each ] [ drop (free) ] 2bi
index d4a11cc9d59606fc1ecd06c5536b4cfa1b729173..320b4783a5dbeac4064fcc22a0a7e6b7ba5c1211 100644 (file)
@@ -16,6 +16,6 @@ IN: cocoa.nibs
 
 : nib-objects ( anNSNib -- objects/f )
     f
-    { void* } [ -> instantiateNibWithOwner:topLevelObjects: ] [ ]
+    { void* } [ -> instantiateNibWithOwner:topLevelObjects: ]
     with-out-parameters
     swap [ CF>array ] [ drop f ] if ;
\ No newline at end of file
index 80d58e634061525383bd2db22899468c62a8e913..e8d28b0004824851dbae683c50fd25cddead32d9 100644 (file)
@@ -38,7 +38,7 @@ DEFER: plist>
 : (read-plist) ( NSData -- id )
     NSPropertyListSerialization swap kCFPropertyListImmutable f
     { void* }
-    [ -> propertyListFromData:mutabilityOption:format:errorDescription: ] [ ]
+    [ -> propertyListFromData:mutabilityOption:format:errorDescription: ]
     with-out-parameters
     [ -> release "read-plist failed" throw ] when* ;
 
index 47d9b4b3370e56da45ee8444ed888e543c4c5848..f263e1e0f87f09da6c964eec95baaf7486b7588e 100755 (executable)
@@ -777,18 +777,18 @@ mingw? [
 [ 3 ] [ blah ] unit-test
 
 : out-param-test-1 ( -- b )
-    { int } [ [ 12 ] dip 0 int set-alien-value ] [ ] with-out-parameters ;
+    { int } [ [ 12 ] dip 0 int set-alien-value ] with-out-parameters ;
 
 [ 12 ] [ out-param-test-1 ] unit-test
 
 : out-param-test-2 ( -- b )
-    { { int initial: 12 } } [ drop ] [ ] with-out-parameters ;
+    { { int initial: 12 } } [ drop ] with-out-parameters ;
 
 [ 12 ] [ out-param-test-2 ] unit-test
 
 : out-param-test-3 ( -- x y )
     { { RECT initial: S{ RECT { x 3 } { y 4 } } } } [ drop ]
-    [ clone ] with-out-parameters
+    with-out-parameters
     [ x>> ] [ y>> ] bi ;
 
 [ 3.0 4.0 ] [ out-param-test-3 ] unit-test
@@ -801,6 +801,6 @@ mingw? [
     { int } [
         swap void { int pointer: int } cdecl
         alien-indirect
-    ] [ ] with-out-parameters ;
+    ] with-out-parameters ;
 
 [ 12 ] [ 6 out-param-callback out-param-indirect ] unit-test
index 0d08c592a961235ea9ca1ddd712f1ef8b9ea003b..23b615f1ae0cbc3acc54cb7272ef01ac154e7925 100644 (file)
@@ -454,7 +454,6 @@ STRUCT: BitmapData { Scan0 void* } ;
     [
         { BitmapData }
         [ BitmapData memory>struct ALIEN: 123 >>Scan0 drop ]
-        [ clone ]
         with-out-parameters Scan0>>
     ] compile-call
 ] unit-test
index b78e1046fee3822c33447aeb584e6ae9ed54a6ed..24bb38e09c5a15347c4547f2ea5f4c824296eddc 100644 (file)
@@ -78,8 +78,7 @@ FUNCTION: CFStringRef CFStringCreateWithCString (
     [ 0 swap <CFRange> kCFStringEncodingUTF8 0 f ] keep
     4 * 1 + <byte-array> [
         dup length
-        { CFIndex } [ CFStringGetBytes drop ] [ ]
-        with-out-parameters
+        { CFIndex } [ CFStringGetBytes drop ] with-out-parameters
     ] keep
     swap head-slice utf8 decode ;
 
index 4de8b2c06a4fd3ef0df9b1dd5473420134e5b93d..014956aba26c616f76bc859c4bbbc6fd7f926425 100644 (file)
@@ -51,7 +51,7 @@ TUPLE: line < disposable line metrics image loc dim ;
 
 : typographic-bounds ( line -- width ascent descent leading )
     { CGFloat CGFloat CGFloat }
-    [ CTLineGetTypographicBounds ] [ ] with-out-parameters ; inline
+    [ CTLineGetTypographicBounds ] with-out-parameters ; inline
 
 : store-typographic-bounds ( metrics width ascent descent leading -- metrics )
     {
index 7fe40a73d6ce30eaf5af2628e7e3e072f1aafe97..11218d21fff4b007a2d4915335f3b169de8ae163 100644 (file)
@@ -146,7 +146,7 @@ M: postgresql-malloc-destructor dispose ( obj -- )
                 ] [
                     &postgresql-free
                 ] if
-            ] [ ] with-out-parameters memory>byte-array
+            ] with-out-parameters memory>byte-array
         ] with-destructors 
     ] [
         drop pq-get-is-null nip [ f ] [ B{ } clone ] if
index 58033a281e8a5bb117eccee0c2371546e588df49..0935fb6c91252d665b04ce14d4f920e51dcb2642 100644 (file)
@@ -27,7 +27,7 @@ ERROR: sqlite-sql-error < sql-error n string ;
 
 : sqlite-open ( path -- db )
     normalize-path
-    { void* } [ sqlite3_open sqlite-check-result ] [ ]
+    { void* } [ sqlite3_open sqlite-check-result ]
     with-out-parameters ;
 
 : sqlite-close ( db -- )
@@ -36,8 +36,8 @@ ERROR: sqlite-sql-error < sql-error n string ;
 : sqlite-prepare ( db sql -- handle )
     utf8 encode dup length
     { void* void* }
-    [ sqlite3_prepare_v2 sqlite-check-result ] [ drop ]
-    with-out-parameters ;
+    [ sqlite3_prepare_v2 sqlite-check-result ]
+    with-out-parameters drop ;
 
 : sqlite-bind-parameter-index ( handle name -- index )
     sqlite3_bind_parameter_index ;
index ecdbee8284880fffdfbc9fb5e3de749822e90638..cc3e4cd531245cdd8fcecef4014cdda30caab93b 100644 (file)
@@ -89,7 +89,7 @@ M: x11-game-input-backend read-keyboard
 : query-pointer ( -- x y buttons )
     dpy get dup XDefaultRootWindow
     { int int int int int int int }
-    [ XQueryPointer drop ] [ ] with-out-parameters
+    [ XQueryPointer drop ] with-out-parameters
     [ 4 ndrop ] 3dip ;
 
 SYMBOL: mouse-reset?
index c0a6ee807da6f5f74e03dee889354bca64f061d8..69a86c7ec3562254414c2e07f0377055ee24ed0d 100755 (executable)
@@ -56,7 +56,7 @@ M: winnt add-completion ( win32-handle -- )
     nanos [ 1,000,000 /i ] [ INFINITE ] if* :> timeout
     master-completion-port get-global
     { int void* pointer: OVERLAPPED }
-    [ timeout GetQueuedCompletionStatus zero? ] [ ] with-out-parameters
+    [ timeout GetQueuedCompletionStatus zero? ] with-out-parameters
     :> ( error? bytes key overlapped )
     bytes overlapped error? ;
 
index 27687df9d5fd7d7975466cfa16286a810d492831..896785b048d6f8809368fb0a4871a4892ba9b38f 100644 (file)
@@ -15,7 +15,7 @@ TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES
 : (open-process-token) ( handle -- handle )
     flags{ TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY }
     { PHANDLE }
-    [ OpenProcessToken win32-error=0/f ] [ ]
+    [ OpenProcessToken win32-error=0/f ]
     with-out-parameters ;
 
 : open-process-token ( -- handle )
index 96e302860d6529f2fbe8c348871d002e2aff150e..2971a15b4b4ea1db87ca756778c2d3bb57187cc1 100755 (executable)
@@ -21,7 +21,7 @@ IN: io.files.info.windows
 TUPLE: windows-file-info < file-info attributes ;
 
 : get-compressed-file-size ( path -- n )
-    { DWORD } [ GetCompressedFileSize ] [ ] with-out-parameters
+    { DWORD } [ GetCompressedFileSize ] with-out-parameters
     over INVALID_FILE_SIZE = [ win32-error-string throw ] [ >64bit ] if ;
 
 : set-windows-size-on-disk ( file-info path -- file-info )
@@ -100,12 +100,12 @@ CONSTANT: path-length $[ MAX_PATH 1 + ]
 : volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
     { { ushort path-length } DWORD DWORD DWORD { ushort path-length } }
     [ [ path-length ] 4dip path-length GetVolumeInformation win32-error=0/f ]
-    [ [ utf16n alien>string ] 4dip utf16n alien>string ]
-    with-out-parameters ;
+    with-out-parameters
+    [ utf16n alien>string ] 4dip utf16n alien>string ;
 
 : file-system-space ( normalized-path -- available-space total-space free-space )
     { ULARGE_INTEGER ULARGE_INTEGER ULARGE_INTEGER }
-    [ GetDiskFreeSpaceEx win32-error=0/f ] [ ]
+    [ GetDiskFreeSpaceEx win32-error=0/f ]
     with-out-parameters ;
 
 : calculate-file-system-info ( file-system-info -- file-system-info' )
@@ -149,24 +149,21 @@ CONSTANT: names-buf-length 16384
 : volume>paths ( string -- array )
     { { ushort names-buf-length } uint }
     [ [ names-buf-length ] dip GetVolumePathNamesForVolumeName win32-error=0/f ]
-    [ head utf16n alien>string { CHAR: \0 } split ]
-    with-out-parameters ;
+    with-out-parameters
+    head utf16n alien>string { CHAR: \0 } split ;
 
 : find-first-volume ( -- string handle )
     { { ushort path-length } }
     [ path-length FindFirstVolume dup win32-error=0/f ]
-    [ utf16n alien>string ]
-    with-out-parameters swap ;
+    with-out-parameters utf16n alien>string swap ;
 
 : find-next-volume ( handle -- string/f )
     { { ushort path-length } }
-    [ path-length FindNextVolume ]
-    [
-        swap 0 = [
-            GetLastError ERROR_NO_MORE_FILES =
-            [ drop f ] [ win32-error-string throw ] if
-        ] [ utf16n alien>string ] if
-    ] with-out-parameters ;
+    [ path-length FindNextVolume ] with-out-parameters
+    swap 0 = [
+        GetLastError ERROR_NO_MORE_FILES =
+        [ drop f ] [ win32-error-string throw ] if
+    ] [ utf16n alien>string ] if ;
 
 : find-volumes ( -- array )
     find-first-volume
@@ -189,8 +186,8 @@ M: winnt file-systems ( -- array )
         normalize-path open-read &dispose handle>>
         { FILETIME FILETIME FILETIME }
         [ GetFileTime win32-error=0/f ]
-        [ [ FILETIME>timestamp >local-time ] tri@ ]
         with-out-parameters
+        [ FILETIME>timestamp >local-time ] tri@
     ] with-destructors ;
 
 : set-file-times ( path timestamp/f timestamp/f timestamp/f -- )
index e036f34cc600bb1bde297bb206259867791b92d5..1eed2eb75e4fd9ad401e4e3d7293daf9264d7a9d 100644 (file)
@@ -95,7 +95,7 @@ TUPLE: signal n ;
     dup WIFSIGNALED [ WTERMSIG signal boa ] [ WEXITSTATUS ] if ;
 
 M: unix wait-for-processes ( -- ? )
-    { int } [ -1 swap WNOHANG waitpid ] [ ] with-out-parameters
+    { int } [ -1 swap WNOHANG waitpid ] with-out-parameters
     swap dup 0 <= [
         2drop t
     ] [
index cc9e52a1898214ad213e702eb9dc46f16e631a24..ecf730716ad7f1b882c4272940ff8926b283c90f 100755 (executable)
@@ -159,7 +159,7 @@ M: windows kill-process* ( handle -- )
 
 : exit-code ( process -- n )
     hProcess>>
-    { DWORD } [ GetExitCodeProcess ] [ ] with-out-parameters
+    { DWORD } [ GetExitCodeProcess ] with-out-parameters
     swap win32-error=0/f ;
 
 : process-exited ( process -- )
index 17e92b9b9fd91b0d0c0cfa10bedfc850b8936af4..13f399697e82e11fd76685fc2954d5cdbc8f9478 100644 (file)
@@ -26,7 +26,7 @@ M: winnt WSASocket-flags ( -- DWORD )
         WSAIoctl SOCKET_ERROR = [
             winsock-error-string throw
         ] when
-    ] [ ] with-out-parameters ;
+    ] with-out-parameters ;
 
 TUPLE: ConnectEx-args port
     s name namelen lpSendBuffer dwSendDataLength
index 5720fc5997896a1ed9066686d8fa0e5979da9611..4dc493222289aa2ed01b19bc0374ccb6a0b0bb45 100644 (file)
@@ -131,11 +131,11 @@ TUPLE: mach-error error-code error-string ;
     dup KERN_SUCCESS = [ drop ] [ <mach-error> throw ] if ;
 
 : master-port ( -- port )
-    MACH_PORT_NULL { uint } [ IOMasterPort mach-error ] [ ] with-out-parameters ;
+    MACH_PORT_NULL { uint } [ IOMasterPort mach-error ] with-out-parameters ;
 
 : io-services-matching-dictionary ( nsdictionary -- iterator )
     master-port swap
-    { uint } [ IOServiceGetMatchingServices mach-error ] [ ] with-out-parameters ;
+    { uint } [ IOServiceGetMatchingServices mach-error ] with-out-parameters ;
 
 : io-services-matching-service ( service -- iterator )
     IOServiceMatching io-services-matching-dictionary ;
index 9bc90cbf7e41b9357dfaeb293e29862647748cd8..3b8ae7d2b4ed9fdf5e8633ff72af29ff2683d366 100644 (file)
@@ -684,7 +684,7 @@ USE: alien
     { c:int float-4 } [
         [ 123 swap 0 c:int c:set-alien-value ]
         [ float-4{ 1 2 3 4 } swap 0 float-4 c:set-alien-value ] bi*
-    ] [ ] with-out-parameters ;
+    ] with-out-parameters ;
 
 [ 123 float-4{ 1 2 3 4 } ] [ simd-stack-test ] unit-test
 
@@ -696,7 +696,7 @@ USE: alien
     { c:int } [
         123 swap 0 c:int c:set-alien-value
         >float (simd-stack-spill-test) float-4-with swap cos v*n
-    ] [ ] with-out-parameters ;
+    ] with-out-parameters ;
 
 [ ] [
     1.047197551196598 simd-stack-spill-test
index ce19a2ec89852388c950afe3d63887cfe526fbfc..5d28d1852cfb700ff2860eff6d3b03fd662ed6b7 100644 (file)
@@ -51,4 +51,4 @@ IN: opengl.framebuffers
 
 : framebuffer-attachment ( attachment -- id )
     GL_FRAMEBUFFER swap GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
-    { uint } [ glGetFramebufferAttachmentParameteriv ] [ ] with-out-parameters ;
+    { uint } [ glGetFramebufferAttachmentParameteriv ] with-out-parameters ;
index 893a8dfbd69f2cfd3ba580f9fa1464d0ecf33585..fda840b281c73290359712d600cb9a3c09da2acc 100644 (file)
@@ -139,7 +139,7 @@ MACRO: all-enabled-client-state ( seq quot -- )
     swap glPushAttrib call glPopAttrib ; inline
 
 : (gen-gl-object) ( quot -- id )
-    [ 1 { uint } ] dip [ ] with-out-parameters ; inline
+    [ 1 { uint } ] dip with-out-parameters ; inline
 
 : (delete-gl-object) ( id quot -- )
     [ 1 swap <uint> ] dip call ; inline
index 4e17a016243098aea654e1a953c33fdf8f2ddf8f..720665a1b8593928640abc712cbd819cc96faaef 100644 (file)
@@ -20,7 +20,7 @@ IN: opengl.shaders
     dup integer? [ glIsShader c-bool> ] [ drop f ] if ;
 
 : gl-shader-get-int ( shader enum -- value )
-    { int } [ glGetShaderiv ] [ ] with-out-parameters ;
+    { int } [ glGetShaderiv ] with-out-parameters ;
 
 : gl-shader-ok? ( shader -- ? )
     GL_COMPILE_STATUS gl-shader-get-int c-bool> ;
@@ -79,7 +79,7 @@ PREDICATE: fragment-shader < gl-shader (fragment-shader?) ;
     dup integer? [ glIsProgram c-bool> ] [ drop f ] if ;
 
 : gl-program-get-int ( program enum -- value )
-    { int } [ glGetProgramiv ] [ ] with-out-parameters ;
+    { int } [ glGetProgramiv ] with-out-parameters ;
 
 : gl-program-ok? ( program -- ? )
     GL_LINK_STATUS gl-program-get-int c-bool> ;
index dacea0888a277fb484d352632e9a85fe1670b8e4..f33ea9e47db26812d600a72b753d4d92cead9af4 100644 (file)
@@ -406,7 +406,7 @@ PRIVATE>
     [ [ max-texture-size tesselate ] dip <multi-texture> ] if ;
 
 : get-texture-float ( target level enum -- value )
-    { float } [ glGetTexLevelParameterfv ] [ ] with-out-parameters ; inline
+    { float } [ glGetTexLevelParameterfv ] with-out-parameters ; inline
 
 : get-texture-int ( target level enum -- value )
-    { int } [ glGetTexLevelParameteriv ] [ ] with-out-parameters ; inline
+    { int } [ glGetTexLevelParameteriv ] with-out-parameters ; inline
index 68a9f2f6df70b0d11ef5679deb79793bfc961733..891a353281ec9f81e3653dda1fc188a3a3e4a81d 100644 (file)
@@ -137,7 +137,7 @@ SYMBOL: dpi
 : line-offset>x ( layout n -- x )
     #! n is an index into the UTF8 encoding of the text
     [ drop first-line ] [ swap string>> >utf8-index ] 2bi
-    0 { int } [ pango_layout_line_index_to_x ] [ ] with-out-parameters
+    0 { int } [ pango_layout_line_index_to_x ] with-out-parameters
     pango>float ;
 
 : x>line-offset ( layout x -- n )
@@ -146,7 +146,7 @@ SYMBOL: dpi
         [ first-line ] dip
         float>pango
         { int int }
-        [ pango_layout_line_x_to_index drop ] [ ] with-out-parameters
+        [ pango_layout_line_x_to_index drop ] with-out-parameters
         swap
     ] [ drop string>> ] 2bi utf8-index> + ;
 
index 0629481a1b53f0f4e635ca866e8b3fd76b38d6df..5c7026bcc88804ca17c441377ba293a974a47722 100755 (executable)
@@ -23,7 +23,7 @@ CONSTANT: factor-crypto-container "FactorCryptoContainer"
         type
         flags
         CryptAcquireContextW
-    ] [ ] with-out-parameters ;
+    ] with-out-parameters ;
 
 : acquire-crypto-context ( provider type -- handle )
     CRYPT_MACHINE_KEYSET
index 13f07b9d41ca50d32792c2c5f9f4b4d85f85ff17..48647df92d0632ab5bba77342a92a88560b553b4 100644 (file)
@@ -57,7 +57,7 @@ M: cocoa-ui-backend (pixel-format-attribute)
     [ drop f ]
     [
         first
-        { int } [ swap 0 -> getValues:forAttribute:forVirtualScreen: ] [ ]
+        { int } [ swap 0 -> getValues:forAttribute:forVirtualScreen: ]
         with-out-parameters
     ] if-empty ;
 
index 06ea870196a5817bd358761dda14c5c1c7b74c03..dba6184c58aca314ab0d219e0880a5b86b164feb 100755 (executable)
@@ -60,14 +60,14 @@ PIXEL-FORMAT-ATTRIBUTE-TABLE: WGL_ARB { $ WGL_SUPPORT_OPENGL_ARB 1 } H{
 
 : arb-make-pixel-format ( world attributes -- pf )
     [ handle>> hDC>> ] dip >WGL_ARB-int-array f 1 { int int }
-    [ wglChoosePixelFormatARB win32-error=0/f ] [ ] with-out-parameters drop ;
+    [ wglChoosePixelFormatARB win32-error=0/f ] with-out-parameters drop ;
 
 : arb-pixel-format-attribute ( pixel-format attribute -- value )
     >WGL_ARB
     [ drop f ] [
         [ [ world>> handle>> hDC>> ] [ handle>> ] bi 0 1 ] dip
         first <int> { int }
-        [ wglGetPixelFormatAttribivARB win32-error=0/f ] [ ]
+        [ wglGetPixelFormatAttribivARB win32-error=0/f ]
         with-out-parameters
     ] if-empty ;
 
index f3d603ddd8fe920a33eb64f8a4878bcd89ca42f4..e2ba7ab4e50d6876d7fb4eab138ff324dfb4f960 100644 (file)
@@ -39,11 +39,11 @@ SINGLETON: x11-ui-backend
         XGetWindowProperty
         Success assert=
     ]
+    with-out-parameters
     [| type format n-atoms bytes-after atoms |
         atoms n-atoms <direct-ulong-array> >array
         atoms XFree
-    ]
-    with-out-parameters ;
+    ] call ;
 
 : net-wm-hint-supported? ( atom -- ? )
     supported-net-wm-hints member? ;
@@ -93,7 +93,7 @@ M: x11-ui-backend (pixel-format-attribute)
     [ handle>> ] [ >glx-visual ] bi*
     [ 2drop f ] [
         first
-        { int } [ glXGetConfig drop ] [ ] with-out-parameters
+        { int } [ glXGetConfig drop ] with-out-parameters
     ] if-empty ;
 
 CONSTANT: modifiers
index b9830a5347eb549a3be748c52c982410452de931..0da98eaf141166b5246a17860c8a4f40a2dddd12 100755 (executable)
@@ -34,5 +34,5 @@ CONSTANT: WM_DWMCOMPOSITIONCHANGED HEX: 31E
 
 : composition-enabled? ( -- ? )
     windows-major 6 >=
-    [ { bool } [ DwmIsCompositionEnabled drop ] [ ] with-out-parameters ]
+    [ { bool } [ DwmIsCompositionEnabled drop ] with-out-parameters ]
     [ f ] if ;
index c2587698d0f53e5d97394d36e7e5247dcfb6537e..02b72388a76a5e55890aed9fc7227cbc9df5375c 100644 (file)
@@ -27,7 +27,7 @@ IN: windows.offscreen
     [ nip ]
     [
         swap (bitmap-info) DIB_RGB_COLORS { void* }
-        [ f 0 CreateDIBSection ] [ ] with-out-parameters
+        [ f 0 CreateDIBSection ] with-out-parameters
     ] 2bi
     [ [ SelectObject drop ] keep ] dip ;
 
index 92fec0a677241e3e069ed5e8dc577ff2aabe7b9c..cde6c11efb48368dea59e67cbde75f0ad0e73071 100755 (executable)
@@ -20,12 +20,12 @@ TUPLE: script-string < disposable font string metrics ssa size image ;
         swap ! icp
         FALSE ! fTrailing
     ] if
-    { int } [ ScriptStringCPtoX ole32-error ] [ ] with-out-parameters ;
+    { int } [ ScriptStringCPtoX ole32-error ] with-out-parameters ;
 
 : x>line-offset ( x script-string -- n trailing )
     ssa>> ! ssa
     swap ! iX
-    { int int } [ ScriptStringXtoCP ole32-error ] [ ] with-out-parameters ;
+    { int int } [ ScriptStringXtoCP ole32-error ] with-out-parameters ;
 
 <PRIVATE