alien.c-types: add summary and docs for no-c-type error

db4
Slava Pestov 2011-04-03 22:33:51 -07:00
parent 1c359f8d7a
commit 59a708638c
2 changed files with 5 additions and 3 deletions

View File

@ -21,7 +21,7 @@ HELP: <c-type>
HELP: no-c-type HELP: no-c-type
{ $values { "name" c-type-name } } { $values { "name" c-type-name } }
{ $description "Throws a " { $link no-c-type } " error." } { $description "Throws a " { $link no-c-type } " error." }
{ $error-description "Thrown by " { $link c-type } " if a given string does not name a C type. When thrown during compile time, indicates a typo in an " { $link alien-invoke } " or " { $link alien-callback } " form." } ; { $error-description "Thrown by " { $link c-type } " if a given word is not a C type." } ;
HELP: c-type HELP: c-type
{ $values { "name" c-type-name } { "c-type" c-type } } { $values { "name" c-type-name } { "c-type" c-type } }

View File

@ -3,7 +3,7 @@
USING: accessors alien alien.accessors arrays byte-arrays USING: accessors alien alien.accessors arrays byte-arrays
classes combinators compiler.units cpu.architecture delegate classes combinators compiler.units cpu.architecture delegate
fry kernel layouts locals macros math math.order quotations fry kernel layouts locals macros math math.order quotations
sequences system words words.symbol ; sequences system words words.symbol summary ;
QUALIFIED: math QUALIFIED: math
IN: alien.c-types IN: alien.c-types
@ -37,7 +37,9 @@ unboxer
: <c-type> ( -- c-type ) : <c-type> ( -- c-type )
\ c-type new ; inline \ c-type new ; inline
ERROR: no-c-type name ; ERROR: no-c-type word ;
M: no-c-type summary drop "Not a C type" ;
! C type protocol ! C type protocol
GENERIC: c-type ( name -- c-type ) foldable GENERIC: c-type ( name -- c-type ) foldable