alien.inline: remove vocab argument from define-c-struct

db4
Jeremy Hughes 2009-07-10 23:54:40 +12:00
parent 2e7f337b3d
commit 0851823ba9
1 changed files with 5 additions and 5 deletions

View File

@ -100,15 +100,15 @@ PRIVATE>
"" make c-strings get push "" make c-strings get push
] 2bi ; ] 2bi ;
: define-c-struct ( name vocab fields -- ) : define-c-struct ( name fields -- )
[ define-struct ] [ [ current-vocab swap define-struct ] [
nip over over
[ [
"typedef struct " % "_" % % " {\n" % "typedef struct " % "_" % % " {\n" %
[ first2 swap % " " % % ";\n" % ] each [ first2 swap % " " % % ";\n" % ] each
"} " % % ";\n" % "} " % % ";\n" %
] "" make c-strings get push ] "" make c-strings get push
] 3bi ; ] 2bi ;
: delete-inline-library ( str -- ) : delete-inline-library ( str -- )
c-library-name [ remove-library ] c-library-name [ remove-library ]
@ -132,7 +132,7 @@ SYNTAX: C-FUNCTION:
SYNTAX: C-TYPEDEF: scan scan define-c-typedef ; SYNTAX: C-TYPEDEF: scan scan define-c-typedef ;
SYNTAX: C-STRUCTURE: SYNTAX: C-STRUCTURE:
scan current-vocab parse-definition define-c-struct ; scan parse-definition define-c-struct ;
SYNTAX: ;C-LIBRARY compile-c-library ; SYNTAX: ;C-LIBRARY compile-c-library ;