]> gitweb.factorcode.org Git - factor.git/commitdiff
alien.c-types: add summary and docs for no-c-type error
authorSlava Pestov <slava@shill.local>
Mon, 4 Apr 2011 05:33:51 +0000 (22:33 -0700)
committerSlava Pestov <slava@shill.local>
Mon, 4 Apr 2011 05:33:51 +0000 (22:33 -0700)
basis/alien/c-types/c-types-docs.factor
basis/alien/c-types/c-types.factor

index e14a5cb5e10ca7bbc9c2b28abff040ec029e905a..dc1754a1497a6cd3e08982b53ed52d7f80948368 100644 (file)
@@ -21,7 +21,7 @@ HELP: <c-type>
 HELP: no-c-type
 { $values { "name" c-type-name } }
 { $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
 { $values { "name" c-type-name } { "c-type" c-type } }
index 19103ce3a8b55128b690b68f068b92919b49e587..48f608037bebab70cf95a6ed9b1f11f0188ff9b0 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors alien alien.accessors arrays byte-arrays
 classes combinators compiler.units cpu.architecture delegate
 fry kernel layouts locals macros math math.order quotations
-sequences system words words.symbol ;
+sequences system words words.symbol summary ;
 QUALIFIED: math
 IN: alien.c-types
 
@@ -37,7 +37,9 @@ unboxer
 : <c-type> ( -- c-type )
     \ 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
 GENERIC: c-type ( name -- c-type ) foldable