[DGD]new arrays in extension kfuncs

Erwin Harte harte at xs4all.nl
Sat Jan 20 21:06:21 CET 2001


On Sat, Jan 20, 2001 at 02:04:20PM -0600, Boris J wrote:
> ..I created dummy code of Erwin Harte's code to test the 'consept':
> 
> 01: void kfunc(DGD_FRAME_T f, int nargs, DGD_VALUE_T *retval)
> 02: {
> 03:
> 04:     DGD_ARRAY_T arr;
> 05:     DGD_DATASPACE_T dataspace;
> 06:     int i, total;
> 07:     DGD_STRING_T str;
          DGD_VALUE_T val;

> 08:
> 09:     dataspace = DGD_FRAME_DATASPACE(f);
> 10:     total = 3;
> 11:     arr = DGD_ARRAY_NEW(dataspace, total);
> 12:     for (i=0;i<total;i++){
> 13:         str = DGD_STRING_NEW("hej",3);
              DGD_PUTVAL(val, str);

> 14:         DGD_ARRAY_ASSIGN(dataspace, arr, i, str);
                                                  ^^^ -> val

> 15:     }
> 16:    DGD_RETVAL_ARR(retval, arr);
> 17:
> 18: }
> 
> When I'm trying to compile it I get these error messages:
> 
> line 14: incompatible type for argument 3 of `d_assign_elt'
> line 14: warning: passing arg 4 of `d_assign_elt' from incompatible
> pointer type
> 
> What's wrong ? The above code seems valid to me :)

I think you didn't see what I changed in the follow-up to my own
message later on. :-)

Erwin.
-- 
Erwin Harte         :    `Don't mind Erwin, he gets crabby. :)'
harte at xs4all.nl     :       -- Par Winzell <zell at skotos.net>

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list