It's impossible to create a typedeffed structure with <struct-boa>:

( scratchpad ) STRUCT: struct1 { x int } ;
( scratchpad ) TYPEDEF: struct1 struct2
( scratchpad ) 1 struct1 <struct-boa> .
S{ struct1 { x 1 } }
( scratchpad ) 2 struct2 <struct-boa> .

Generic word fields>> does not define a method for the word class.
Dispatching on object: struct1


<struct-boa> calls struct-slots ("c-type" word-prop fields>>), which
doesn't work because:

( scratchpad ) struct1 "c-type" word-prop .
T{ struct-c-type
    { class byte-array }
    { boxed-class struct1 }
    { boxer-quot [ \ struct1 memory>struct ] }
    { unboxer-quot [ >c-ptr ] }
    { size 4 }
    { align 4 }
    { align-first 4 }
    { fields
        {
            T{ struct-slot-spec
                { name "x" }
                { offset 0 }
                { class fixnum }
                { initial 0 }
                { type int }
            }
        }
    }
}
( scratchpad ) struct2 "c-type" word-prop .
struct1

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to