change c-type-* to c-* everywhere

db4
Joe Groff 2009-08-30 19:05:29 -05:00
parent 361cc04b02
commit 0df9884ee5
3 changed files with 8 additions and 8 deletions

View File

@ -35,8 +35,8 @@ M: array stack-size drop "void*" stack-size ;
M: array c-type-boxer-quot
unclip
[ array-length ]
[ [ require-c-type-arrays ] keep ] bi*
[ <c-type-direct-array> ] 2curry ;
[ [ require-c-arrays ] keep ] bi*
[ <c-direct-array> ] 2curry ;
M: array c-type-unboxer-quot drop [ >c-ptr ] ;

View File

@ -4,7 +4,7 @@ USING: accessors kernel classes.struct cocoa cocoa.types alien.c-types
locals math sequences vectors fry libc destructors ;
IN: cocoa.enumeration
<< "id" require-c-type-arrays >>
<< "id" require-c-arrays >>
CONSTANT: NS-EACH-BUFFER-SIZE 16
@ -19,7 +19,7 @@ CONSTANT: NS-EACH-BUFFER-SIZE 16
:: (NSFastEnumeration-each) ( object quot: ( elt -- ) state stackbuf count -- )
object state stackbuf count -> countByEnumeratingWithState:objects:count: :> items-count
items-count 0 = [
state itemsPtr>> [ items-count "id" <c-type-direct-array> ] [ stackbuf ] if* :> items
state itemsPtr>> [ items-count "id" <c-direct-array> ] [ stackbuf ] if* :> items
items-count iota [ items nth quot call ] each
object quot state stackbuf count (NSFastEnumeration-each)
] unless ; inline recursive

View File

@ -54,13 +54,13 @@ ERROR: bad-byte-array-length byte-array ;
INSTANCE: struct-array sequence
M: struct-type <c-type-array> ( len c-type -- array )
dup c-type-array-constructor
M: struct-type <c-array> ( len c-type -- array )
dup c-array-constructor
[ execute( len -- array ) ]
[ <struct-array> ] ?if ; inline
M: struct-type <c-type-direct-array> ( alien len c-type -- array )
dup c-type-direct-array-constructor
M: struct-type <c-direct-array> ( alien len c-type -- array )
dup c-direct-array-constructor
[ execute( alien len -- array ) ]
[ <direct-struct-array> ] ?if ; inline