GEC Compilation of Externals
"Brian Heilig" <Brian.Heilig-tdt4z+Mb/[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <[email protected]> |
GEC generates bad C code for some of my external routines in secom.
However the external compiles correctly on SmartEiffel 1.0 and ES
5.6. Here is the Eiffel code:
c_set_read_total_constant (an_item: POINTER; a_value: INTEGER) is
external
"C inline use <windows.h>"
alias
"((LPCOMMTIMEOUTS) $an_item)->ReadTotalTimeoutConstant = $a_value"
end
And here is the generated C code:
/* COM_TIMEOUTS.c_set_read_total_constant */
void T78f23(T0* C, T14 a1, T4 a2)
{
((LPCOMMTIMEOUTS) a1)->ReadTotalTimeoutConstant = a2
}
I think the only problem here is that the semi-colon is missing.
Here is the code generated by SmartEiffel (irrelevant parts removed):
void r227c_set_read_total_constant(se_dump_stack*caller,T8 a1,T2 a2){
...
((LPCOMMTIMEOUTS) a1)->ReadTotalTimeoutConstant = a2;
...
}
Will this be 'fixed' or should I change my code? If I need to change
my code to compile with SE, ISE, and GEC, what do I need to do?
Thanks for your help,
Brian
------------------------ Yahoo! Groups Sponsor --------------------~-->
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
To Post a message, send it to: [email protected]
To Unsubscribe, send a blank message to: [email protected]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/gobo-eiffel/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/