search for: rtcl_objfromrawvector

Displaying 1 result from an estimated 1 matches for "rtcl_objfromrawvector".

2012 Jun 06
1
tcltk wish: Add tclObj.raw method for converting raw vectors to tclObj
...lObj" (IIRC this change was made in 2.9 after someone requested it), however there is no corresponding C routine for converting raw vectors into tclObj. I suppose the best way to do this is to create a new C routine in the tcltk package analogous to the other RObject to Tcl object routines: RTcl_ObjFromRawVector. Create a new tclObj pointer, use Tcl_NewByteArrayObj() from the Tcl C API to create a byte array of the same length as the input raw vector, and then loop through the RAWSXP object assigning each element in the vector to the Tcl byte array. I'd be happy to submit code for this patch if request...