[DGD] Problem with extensions
ind@o2.pl
ind at o2.pl
Tue Feb 22 08:21:01 CET 2005
I'm adding an example 'lower_case' kfun from '/doc/Extensions':
static DGD_EXTKFUN_T kf[1] =
{
"lower_case",
lower_case_proto,
&dgd_lower_case
};
...with included prototype:
static char lower_case_proto[] = { DGD_TYPE_STRING, DGD_TYPE_STRING, 0 };
...with standard extension_init():
void extension_init(void)
{
DGD_EXT_KFUN(kf, 1);
}
...and LPC code in initd.c:
driver->message(lower_case("lOwEr\n"))
...causes an error:
/u/System/initd.c, 61: bad argument 1 for function lower_case (needs nil)
/u/System/initd.c, 61: too few arguments for function lower_case
What is wrong? Other (older?) longer versions of prototype like the one explained
some time ago by Dworkin, without ending \0 byte etc. also doesn't work.
Tested on DGD 1.2.90. Same result on WinXP + VS2003 and NetBSD1.6.2 + gcc2.95.3.
Thanks in advance.
More information about the DGD
mailing list