[DGD]Problems with Array Extension Macro
Michael J. Bacon
mj.bacon at gte.net
Wed Jan 17 17:06:41 CET 2001
Trying to extract an element from an array in an extension:
static void test(DGD_FRAME_T f, int nargs, DGD_VALUE_T *retval)
{
DGD_ARRAY_T p1;
DGD_VALUE_T val;
val = DGD_FRAME_ARG(f, nargs, 0);
p1 = DGD_ARRAY_GETVAL(val);
val = DGD_ARRAY_INDEX(p1, 0); // <---- problem line
DGD_RETVAL_ARR(retval, p1);
}
I get an error trying to compile this on the "val = DGD_ARRAY_INDEX(p1,0);"
line I get the following error:
"error C2100: illegal indirection"
Any idea what I am doing wrong? If I comment out this line, everything
works fine and I know the array is getting to the function properly because
it comes back as a return value OK.
Thanks;
Michael.
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list