On Fri, Mar 12, 2010 at 10:40 PM, Matthew Mondor <span dir="ltr"><<a href="mailto:mm_lists@pulsar-zone.net">mm_lists@pulsar-zone.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I get<br>
C compilation errors: "error: stray '@' in program", suggesting that<br>
CLINES does not do @ preprocessing. Is there a way to tell CLINES to<br>
do so,</blockquote><div><br>Not right now. CLINES is not intended to be used for arbitrary C code, but rather small pieces such as header inclusion. The reason is that CLINES become part of the header and are included before anything else.<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">or should I find a way to use C-INLINE instead?</blockquote><div><br>You may also consider writing a lisp function and exporting it to the C world with a given C name, as in<br>
<br>(proclaim '(ext:c-export-name ("my_constructor" my-constructor)))<br><br>and then try calling the function from C code. Note that this lisp function should only take a fixed number of arguments and all of them having type cl_object.<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> Also, I've not<br>
fully read the compiler and I'm wondering if there's not a function I<br>
could simply call to preprocess a string containing C code.<br></blockquote><div><br>Again, no. Processing of @ forms is done when emitting the C code itself.<br></div></div><br clear="all">Juanjo<br><br>-- <br>Instituto de Física Fundamental, CSIC<br>
c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com">http://juanjose.garciaripoll.googlepages.com</a><br>