char array as embedding attr

jml's icon

My obj has char array in its struct that is meant to be saved w/ the patcher in which the obj lives.
i am declaring it as an attr and calling CLASS_ATTR_VARSIZE and CLASS_ATTR_SAVE, but I notice when the attribute is saved w/ the patcher it is the full size of the buffer, regardless of the number passed as the 2nd to last argument of CLASS_ATTR_VARSIZE. Is there anything I can do to ensure that the number passed eliminates trailing characters?

Thanks for any help,
jml

jml's icon

This is the code that I cal in order to prepare the atom array to be saved:CLASS_ATTR_CHAR_VARSIZE(c, "user-ints", 0, t_myobj, intbuf, intbuf_len, BUFSIZE);

Thanks
jml

jml's icon

sorry; i meant char array, charbuf, and charbuf_len in my 2nd post. :s
word in the hills is that i need to write my own custom getter and setter... off i go!