Ok, I though you where missing information to be able to call some Felix code - The thread frame pointer - and needed to intrusively change C++ code to pass it around... This is annoying but not as much as I thought initially. The b gratuitous variable creation, could be manageable depending of the need.
-----Original Message----- From: skaller [mailto:[EMAIL PROTECTED] Sent: 11 juillet 2006 14:31 To: Stephane Le Dorze Cc: [email protected] Subject: RE: [Felix-language] garbage collection. On Tue, 2006-07-11 at 13:54 -0400, Stephane Le Dorze wrote: > Oh! This is right; what a mess... > I have to think my design avoiding as much as possible using callbacks > from C++. Callbacks aren't a problem! The problem is *embedding* Felix code in C++ code: void f(int x) { printf ("%d\n", FELIX(g x)); } where the FELIX macro actually replaces its argument 'g x', which is Felix code, with the corresponding C++. Of course literally doing this is trivial, the problem is to get the names and types to agree: in this case we may want the 'x' in the Felix code to refer to the 'x' which is the C++ function f()'s argument. But Felix mangles the names of variables .. so you'd need to do something like: void f(int x) { int FELIX(x) = x; // initialise the Felix variable x with the C++ x printf ("%d\n", FELIX(g x)); } This introduces a 'gratuitous' variable. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Felix-language mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/felix-language
