Update a few places that used string C type names to use words; fixes some deploy tests
parent
24c3ddbbde
commit
ffd7de02d6
|
@ -16,7 +16,7 @@ ERROR: cairo-error message ;
|
|||
|
||||
: check-surface ( surface -- ) cairo_surface_status (check-cairo) ;
|
||||
|
||||
: width>stride ( width -- stride ) "uint" heap-size * ; inline
|
||||
: width>stride ( width -- stride ) uint heap-size * ; inline
|
||||
|
||||
: <image-surface> ( data dim -- surface )
|
||||
[ CAIRO_FORMAT_ARGB32 ] dip first2 over width>stride
|
||||
|
|
|
@ -32,14 +32,14 @@ ERROR: sqlite-sql-error < sql-error n string ;
|
|||
|
||||
: sqlite-open ( path -- db )
|
||||
normalize-path
|
||||
"void*" <c-object>
|
||||
void* <c-object>
|
||||
[ sqlite3_open sqlite-check-result ] keep *void* ;
|
||||
|
||||
: sqlite-close ( db -- )
|
||||
sqlite3_close sqlite-check-result ;
|
||||
|
||||
: sqlite-prepare ( db sql -- handle )
|
||||
utf8 encode dup length "void*" <c-object> "void*" <c-object>
|
||||
utf8 encode dup length void* <c-object> void* <c-object>
|
||||
[ sqlite3_prepare_v2 sqlite-check-result ] 2keep
|
||||
drop *void* ;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ IN: images.memory
|
|||
|
||||
<PRIVATE
|
||||
|
||||
: bitmap-size ( dim -- n ) product "uint" heap-size * ;
|
||||
: bitmap-size ( dim -- n ) product uint heap-size * ;
|
||||
|
||||
: malloc-bitmap-data ( dim -- alien ) bitmap-size 1 calloc &free ;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ kernel.private math io.ports sequences strings sbufs threads
|
|||
unix vectors io.buffers io.backend io.encodings math.parser
|
||||
continuations system libc namespaces make io.timeouts
|
||||
io.encodings.utf8 destructors destructors.private accessors
|
||||
summary combinators locals unix.time fry
|
||||
summary combinators locals unix.time unix.types fry
|
||||
io.backend.unix.multiplexers ;
|
||||
QUALIFIED: io
|
||||
IN: io.backend.unix
|
||||
|
@ -151,7 +151,7 @@ M: stdin dispose*
|
|||
|
||||
: wait-for-stdin ( stdin -- n )
|
||||
[ control>> CHAR: X over io:stream-write1 io:stream-flush ]
|
||||
[ size>> "ssize_t" heap-size swap io:stream-read *int ]
|
||||
[ size>> ssize_t heap-size swap io:stream-read *int ]
|
||||
bi ;
|
||||
|
||||
:: refill-stdin ( buffer stdin size -- )
|
||||
|
|
|
@ -20,7 +20,7 @@ IN: io.files.info.windows
|
|||
TUPLE: windows-file-info < file-info attributes ;
|
||||
|
||||
: get-compressed-file-size ( path -- n )
|
||||
"DWORD" <c-object> [ GetCompressedFileSize ] keep
|
||||
DWORD <c-object> [ GetCompressedFileSize ] keep
|
||||
over INVALID_FILE_SIZE = [
|
||||
win32-error-string throw
|
||||
] [
|
||||
|
@ -100,9 +100,9 @@ M: windows link-info ( path -- info )
|
|||
|
||||
: volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
|
||||
MAX_PATH 1 + [ <ushort-array> ] keep
|
||||
"DWORD" <c-object>
|
||||
"DWORD" <c-object>
|
||||
"DWORD" <c-object>
|
||||
DWORD <c-object>
|
||||
DWORD <c-object>
|
||||
DWORD <c-object>
|
||||
MAX_PATH 1 + [ <ushort-array> ] keep
|
||||
[ GetVolumeInformation win32-error=0/f ] 7 nkeep
|
||||
drop 5 nrot drop
|
||||
|
@ -110,9 +110,9 @@ M: windows link-info ( path -- info )
|
|||
utf16n alien>string ;
|
||||
|
||||
: file-system-space ( normalized-path -- available-space total-space free-space )
|
||||
"ULARGE_INTEGER" <c-object>
|
||||
"ULARGE_INTEGER" <c-object>
|
||||
"ULARGE_INTEGER" <c-object>
|
||||
ULARGE_INTEGER <c-object>
|
||||
ULARGE_INTEGER <c-object>
|
||||
ULARGE_INTEGER <c-object>
|
||||
[ GetDiskFreeSpaceEx win32-error=0/f ] 3keep ;
|
||||
|
||||
: calculate-file-system-info ( file-system-info -- file-system-info' )
|
||||
|
@ -160,7 +160,7 @@ M: winnt file-system-info ( path -- file-system-info )
|
|||
ret 0 = [
|
||||
ret win32-error-string throw
|
||||
] [
|
||||
names names-length *uint "ushort" heap-size * head
|
||||
names names-length *uint ushort heap-size * head
|
||||
utf16n alien>string CHAR: \0 split
|
||||
] if ;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ C: <FileArgs> FileArgs
|
|||
[ handle>> handle>> ]
|
||||
[ buffer>> ]
|
||||
[ buffer>> buffer-length ]
|
||||
[ drop "DWORD" <c-object> ]
|
||||
[ drop DWORD <c-object> ]
|
||||
[ FileArgs-overlapped ]
|
||||
} cleave <FileArgs> ;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ IN: io.sockets.unix
|
|||
0 socket dup io-error <fd> init-fd |dispose ;
|
||||
|
||||
: set-socket-option ( fd level opt -- )
|
||||
[ handle-fd ] 2dip 1 <int> "int" heap-size setsockopt io-error ;
|
||||
[ handle-fd ] 2dip 1 <int> dup byte-length setsockopt io-error ;
|
||||
|
||||
M: unix addrinfo-error ( n -- )
|
||||
[ gai_strerror throw ] unless-zero ;
|
||||
|
|
|
@ -16,10 +16,10 @@ M: winnt WSASocket-flags ( -- DWORD )
|
|||
SIO_GET_EXTENSION_FUNCTION_POINTER
|
||||
WSAID_CONNECTEX
|
||||
GUID heap-size
|
||||
"void*" <c-object>
|
||||
void* <c-object>
|
||||
[
|
||||
"void*" heap-size
|
||||
"DWORD" <c-object>
|
||||
void* heap-size
|
||||
DWORD <c-object>
|
||||
f
|
||||
f
|
||||
WSAIoctl SOCKET_ERROR = [
|
||||
|
|
|
@ -16,7 +16,7 @@ M: windows-crypto-context dispose ( tuple -- )
|
|||
CONSTANT: factor-crypto-container "FactorCryptoContainer"
|
||||
|
||||
:: (acquire-crypto-context) ( provider type flags -- handle ret )
|
||||
"HCRYPTPROV" <c-object> :> handle
|
||||
HCRYPTPROV <c-object> :> handle
|
||||
handle
|
||||
factor-crypto-container
|
||||
provider
|
||||
|
|
|
@ -20,7 +20,7 @@ SPECIALIZED-ARRAYS: bool ushort char uint float ulonglong ;
|
|||
|
||||
[ t ] [
|
||||
{ t f t } >bool-array underlying>>
|
||||
{ 1 0 1 } "bool" heap-size {
|
||||
{ 1 0 1 } bool heap-size {
|
||||
{ 1 [ >char-array ] }
|
||||
{ 4 [ >uint-array ] }
|
||||
} case underlying>> =
|
||||
|
|
|
@ -31,7 +31,6 @@ IN: tools.deploy.shaker
|
|||
{
|
||||
"alien.strings"
|
||||
"cpu.x86"
|
||||
"destructors"
|
||||
"environment"
|
||||
"libc"
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ IN: tools.disassembler.udis.tests
|
|||
USING: tools.disassembler.udis tools.test alien.c-types system combinators kernel ;
|
||||
|
||||
{
|
||||
{ [ os linux? cpu x86.64? and ] [ [ 656 ] [ "ud" heap-size ] unit-test ] }
|
||||
{ [ os macosx? cpu x86.32? and ] [ [ 592 ] [ "ud" heap-size ] unit-test ] }
|
||||
{ [ os macosx? cpu x86.64? and ] [ [ 656 ] [ "ud" heap-size ] unit-test ] }
|
||||
{ [ os linux? cpu x86.64? and ] [ [ 656 ] [ ud heap-size ] unit-test ] }
|
||||
{ [ os macosx? cpu x86.32? and ] [ [ 592 ] [ ud heap-size ] unit-test ] }
|
||||
{ [ os macosx? cpu x86.64? and ] [ [ 656 ] [ ud heap-size ] unit-test ] }
|
||||
[ ]
|
||||
} cond
|
|
@ -130,7 +130,7 @@ CONSTANT: _UTX_HOSTSIZE 256
|
|||
CONSTANT: _SS_MAXSIZE 128
|
||||
|
||||
: _SS_ALIGNSIZE ( -- n )
|
||||
"__int64_t" heap-size ; inline
|
||||
__int64_t heap-size ; inline
|
||||
|
||||
: _SS_PAD1SIZE ( -- n )
|
||||
_SS_ALIGNSIZE 2 - ; inline
|
||||
|
|
|
@ -35,7 +35,7 @@ FUNCTION: void ReleaseStgMedium ( LPSTGMEDIUM pmedium ) ;
|
|||
|
||||
: com-query-interface ( interface iid -- interface' )
|
||||
[
|
||||
"void*" malloc-object &free
|
||||
void* malloc-object &free
|
||||
[ IUnknown::QueryInterface ole32-error ] keep *void*
|
||||
] with-destructors ;
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ M: bunny-buffers bunny-geom
|
|||
{ GL_VERTEX_ARRAY GL_NORMAL_ARRAY } [
|
||||
GL_FLOAT 0 0 buffer-offset glNormalPointer
|
||||
[
|
||||
nv>> "float" heap-size * buffer-offset
|
||||
nv>> c:float heap-size * buffer-offset
|
||||
[ 3 GL_FLOAT 0 ] dip glVertexPointer
|
||||
] [
|
||||
ni>>
|
||||
|
|
Loading…
Reference in New Issue