Descent 0.5.4 released

Ary Borenszweig ary at esperanto.org.ar
Tue Jan 27 09:42:56 PST 2009


Trass3r wrote:
> Getting the results of a mixin doesn't seem to work if a function is used:
> 
> mixin (mixinLuaRegisterFunction ("L", "simpleFunction", "mylib.func"));
> 
> public static istring mixinLuaPushFunction (cstring lua_state, cstring 
> name)
> {
>     return cast(istring) (`mixin (mixinLuaPushFunctionAtLine ("` ~ 
> lua_state ~ `", "` ~ name ~ `", __LINE__));`);
> }

I tried this:

---
mixin(defineInt("bar"));

char[] defineInt(char[] name) {
	return "int " ~ name ~ ";";
}
---

and it fails, but it also fails under DMD (1 and 2). If I change the order:

---
char[] defineInt(char[] name) {
	return "int " ~ name ~ ";";
}

mixin(defineInt("bar"));
---

it works both in DMD and Descent.

Also, I see some istring and cstring. If you are using D2 it is more 
likely that it won't work, because D2 is still not fully ported to Descent.


More information about the Digitalmars-d-announce mailing list