<div dir="ltr"><div>What I want is to use c preprocessor to generate easy wrappers around c++ class methods. For every class, I would like to make a<br></div><div>lisp class, which would have one slot containing the actual void* point, and macros would generate functions which will autocast <br>
</div><div>cl_object and/or the slot value of the item into c++ type. However, what I would like is to install new methods for these c functions.<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/2/28 Juan Jose Garcia-Ripoll <span dir="ltr"><<a href="mailto:juanjose.garciaripoll@gmail.com" target="_blank">juanjose.garciaripoll@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="im"><br><div class="gmail_quote">On Thu, Feb 28, 2013 at 6:39 PM, Peter Enerccio <span dir="ltr"><<a href="mailto:enerccio@gmail.com" target="_blank">enerccio@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am yet on the writing api in c++ for ecl, but I am quite puzzled on how to create basic things, such as lisp methods/classes directly in c environment? The documentation is silent about this. Can anyone help?<span><font color="#888888"><br clear="all">



<div></div></font></span></div></blockquote></div><br></div>There is no provision in C for dealing with CLOS objects, defgeneric or defmethod. It simply cannot be done because defclass, defgeneric and defmethod are not functions, but sophisticated macros that parse and modify their arguments in interesting (but complicated ways).</div>


<div class="gmail_extra"><br></div><div class="gmail_extra">My suggestion is that you evaluate lisp code from C if you want to create new classes and methods. This may be done either from text or from S-expressions, as usual.</div>


<div class="gmail_extra"><br></div><div class="gmail_extra">If this looks too cumbersome, could you explain what you want to achieve and how?<br><br>Juanjo<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br>
</div>-- <br>Instituto de Física Fundamental, CSIC<br>

c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Bc. Peter Vaňušanik<br><a href="http://www.bishojo.tk" target="_blank">http://www.bishojo.tk</a><br>
</div>