diff --git a/basis/alien/structs/fields/fields.factor b/basis/alien/structs/fields/fields.factor index 7e2d4615b5..f958847abd 100644 --- a/basis/alien/structs/fields/fields.factor +++ b/basis/alien/structs/fields/fields.factor @@ -7,10 +7,10 @@ IN: alien.structs.fields TUPLE: field-spec name offset type reader writer ; : reader-word ( class name vocab -- word ) - [ "-" glue ] dip create ; + [ "-" glue ] dip create dup make-deprecated ; : writer-word ( class name vocab -- word ) - [ [ swap "set-" % % "-" % % ] "" make ] dip create ; + [ [ swap "set-" % % "-" % % ] "" make ] dip create dup make-deprecated ; : ( struct-name vocab type field-name -- spec ) field-spec new diff --git a/basis/alien/structs/structs-docs.factor b/basis/alien/structs/structs-docs.factor index c74fe22dfd..c2a7d43387 100644 --- a/basis/alien/structs/structs-docs.factor +++ b/basis/alien/structs/structs-docs.factor @@ -30,4 +30,4 @@ ARTICLE: "c-unions" "C unions" { $subsection POSTPONE: C-UNION: } "C union objects can be allocated by calling " { $link } " or " { $link malloc-object } "." $nl -"Arrays of C unions can be created with the " { $vocab-link "struct-arrays" } " vocabulary." ; \ No newline at end of file +"Arrays of C unions can be created with the " { $vocab-link "struct-arrays" } " vocabulary." ; diff --git a/basis/alien/structs/structs.factor b/basis/alien/structs/structs.factor index 85b55f2cbc..fed3ce801b 100755 --- a/basis/alien/structs/structs.factor +++ b/basis/alien/structs/structs.factor @@ -55,12 +55,12 @@ M: struct-type stack-size [ struct-offsets ] keep [ [ type>> ] map compute-struct-align ] keep [ struct-type (define-struct) ] keep - [ define-field ] each ; + [ define-field ] each ; deprecated : define-union ( name members -- ) [ expand-constants ] map [ [ heap-size ] [ max ] map-reduce ] keep - compute-struct-align f struct-type (define-struct) ; + compute-struct-align f struct-type (define-struct) ; deprecated : offset-of ( field struct -- offset ) c-types get at fields>> diff --git a/basis/alien/syntax/syntax-docs.factor b/basis/alien/syntax/syntax-docs.factor index a3215cd8c6..c9e03724f5 100644 --- a/basis/alien/syntax/syntax-docs.factor +++ b/basis/alien/syntax/syntax-docs.factor @@ -1,6 +1,6 @@ IN: alien.syntax USING: alien alien.c-types alien.parser alien.structs -help.markup help.syntax ; +classes.struct help.markup help.syntax ; HELP: DLL" { $syntax "DLL\" path\"" } @@ -55,12 +55,14 @@ HELP: TYPEDEF: { $notes "This word differs from " { $link typedef } " in that it runs at parse time, to ensure correct ordering of operations when loading source files. Words defined in source files are compiled before top-level forms are run, so if a source file defines C binding words and uses " { $link typedef } ", the type alias won't be available at compile time." } ; HELP: C-STRUCT: +{ $deprecated "New code should use " { $link "classes.struct" } ". See the " { $link POSTPONE: STRUCT: } " word." } { $syntax "C-STRUCT: name pairs... ;" } { $values { "name" "a new C type name" } { "pairs" "C type / field name string pairs" } } { $description "Defines a C struct layout and accessor words." } { $notes "C type names are documented in " { $link "c-types-specs" } "." } ; HELP: C-UNION: +{ $deprecated "New code should use " { $link "classes.struct" } ". See the " { $link POSTPONE: UNION-STRUCT: } " word." } { $syntax "C-UNION: name members... ;" } { $values { "name" "a new C type name" } { "members" "a sequence of C types" } } { $description "Defines a new C type sized to fit its largest member." } diff --git a/basis/alien/syntax/syntax.factor b/basis/alien/syntax/syntax.factor index b70aa3557c..2b0270d5f5 100644 --- a/basis/alien/syntax/syntax.factor +++ b/basis/alien/syntax/syntax.factor @@ -22,10 +22,10 @@ SYNTAX: TYPEDEF: scan scan typedef ; SYNTAX: C-STRUCT: - scan current-vocab parse-definition define-struct ; + scan current-vocab parse-definition define-struct ; deprecated SYNTAX: C-UNION: - scan parse-definition define-union ; + scan parse-definition define-union ; deprecated SYNTAX: C-ENUM: ";" parse-tokens