Re: eXene and openGL

brian <briand-/[email protected]>
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>


On Jan 5, 2007, at 9:26 PM, John Reppy wrote:

>
> On Jan 5, 2007, at 9:37 AM, brian wrote:
>
>> That would be great and solve the problem.
>>
>> A while back I wrote a swig -> xml -> sxml -> gambit-C FFI generator.
>>
>> I found swig to be quite robust.
>>
>> That's because it could understand function definitions and such.   
>> It didn't parse functions, but if they were in the include file,  
>> it could at least get the declaration and skip over the rest.
>>
>> ml-nlffigen doesn't like functions in the headers and it also  
>> doesn't like:
>>
>> __attribute__ (("whatever"))
>
> I think that with the right C preprocessor options, these should be  
> filtered out
> (something like -std=ansi).
>

Maybe, but I can't find which one.  -ansi certainly doesn't do it.

However -P is very useful in that it excludes those pesky line #'s


> As far as OStypes.h, it doesn't include function definitions on my  
> Mac; perhaps
> you meant a different file?

Sorry wrong file, it's  OSByteOrder.h

>
> Swig was designed to handle C++, so it pretty much has to deal with  
> function defs
> in header files.  CKit can handle them, so it shouldn't be too hard  
> to modify
> ml-nlffigen to ignore such things.
>


Yes it could.  Unfortunately we'll need a volunteer ;-)

I took a look at c-kit and I'm quite surprised that it can't handle  
the function defs.  It's seems to be capable.  It might be because  
they have __inline__ keywords and such in the way also.



Brian


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.