[GPS]: This function is used to create a ByteArray object from a structure/pointer/memory. I use it in combination with [obj_to_mem]. ---- /* REVISION 70 */ #ifndef _MEM_TO_OBJ_C #define _MEM_TO_OBJ_C inline Tcl_Obj * mem_to_obj ( void *mem, size_t s ) { #line 4 return Tcl_NewByteArrayObj ((unsigned char *)mem, s); } #endif /* _MEM_TO_OBJ_C */ ---- Example usage: GC gc; Tcl_Obj *r; /* gc = XCreateGC ... */ r = mem_to_obj (&gc, sizeof (GC)); ---- See also: [obj_to_mem]