The next stage for migrating C types to words is to stop accepting string C types in the parsers for STRUCT:, TYPEDEF:, and FUNCTION:. I've updated all the code in the repository to prepare for this change, so I'm going to go ahead and remove the string fallback for C type parsing. The potential effects on your code are:

- You'll need to USE: whatever vocabularies your C types are defined in.
- You now need to define C types even if you only use them as a pointer type. That is, "nonsense*" won't parse as a C type unless "nonsense" has been declared beforehand. For truly opaque types, there's a new "C-TYPE:" syntax that defines a C type that is only valid as the type of a pointer. So if you had only this before:

        FUNCTION: int foo ( opaque* x ) ;

You'll need to declare "opaque" now:

        C-TYPE: opaque
        FUNCTION: int foo ( opaque* x ) ;

You can also use C-TYPE: to forward declare struct types and break circular references:

        C-TYPE: forward
        STRUCT: backward { x forward* } ;
        STRUCT: forward { x backward* } ;

String C types can still be used in toplevel forms for the time being, since the Cocoa bridge and maybe some other code here and there still depends on the global string values being available. But consider C type strings to be on notice.

-Joe
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to