alien.c-types: move definitions of stdint.h from unix.types.

db4
John Benediktsson 2014-12-23 19:40:21 -08:00
parent e60c661f72
commit 56b95b09a1
2 changed files with 16 additions and 16 deletions

View File

@ -62,7 +62,6 @@ M: word lookup-c-type
dup "c-type" word-prop resolve-typedef
[ ] [ no-c-type ] ?if ;
GENERIC: c-type-class ( name -- class )
M: abstract-c-type c-type-class class>> ;
@ -139,7 +138,7 @@ MACRO: set-alien-value ( c-type -- quot: ( value c-ptr offset -- ) )
: set-alien-element ( value n c-ptr c-type -- )
array-accessor set-alien-value ; inline
PROTOCOL: c-type-protocol
PROTOCOL: c-type-protocol
c-type-class
c-type-boxed-class
c-type-boxer-quot
@ -176,7 +175,8 @@ TUPLE: long-long-type < c-type ;
SYMBOLS:
ptrdiff_t intptr_t uintptr_t size_t
c-string ;
c-string int8_t uint8_t int16_t uint16_t
int32_t uint32_t int64_t uint64_t ;
CONSTANT: primitive-types
{
@ -332,7 +332,7 @@ M: pointer lookup-c-type
"to_signed_4" >>unboxer
[ >fixnum ] >>unboxer-quot
\ int typedef
! 64bit-vm uint
<c-type>
fixnum >>class
@ -404,7 +404,7 @@ M: pointer lookup-c-type
"to_fixnum" >>unboxer
[ >integer ] >>unboxer-quot
\ int typedef
! 32bit-vm uint
<c-type>
integer >>class
@ -462,6 +462,16 @@ M: pointer lookup-c-type
object >>boxed-class
\ bool typedef
\ char lookup-c-type int8_t typedef
\ short lookup-c-type int16_t typedef
\ int lookup-c-type int32_t typedef
\ longlong lookup-c-type int64_t typedef
\ uchar lookup-c-type uint8_t typedef
\ ushort lookup-c-type uint16_t typedef
\ uint lookup-c-type uint32_t typedef
\ ulonglong lookup-c-type uint64_t typedef
] with-compilation-unit
M: char-16-rep rep-component-type drop char ;

View File

@ -2,16 +2,6 @@ USING: accessors alien.c-types alien.syntax system vocabs ;
FROM: sequences => append ;
IN: unix.types
TYPEDEF: char int8_t
TYPEDEF: short int16_t
TYPEDEF: int int32_t
TYPEDEF: longlong int64_t
TYPEDEF: uchar uint8_t
TYPEDEF: ushort uint16_t
TYPEDEF: uint uint32_t
TYPEDEF: ulonglong uint64_t
TYPEDEF: uchar u_int8_t
TYPEDEF: ushort u_int16_t
TYPEDEF: uint u_int32_t
@ -32,7 +22,7 @@ TYPEDEF: uint in_addr_t
TYPEDEF: uint socklen_t
TYPEDEF: __uint64_t fsblkcnt_t
TYPEDEF: fsblkcnt_t __fsblkcnt_t
TYPEDEF: fsblkcnt_t __fsblkcnt_t
TYPEDEF: __uint64_t fsfilcnt_t
TYPEDEF: fsfilcnt_t __fsfilcnt_t
TYPEDEF: __uint64_t rlim_t