From: Vlad S. <vl...@cr...> - 2005-06-10 15:07:49
|
I thought about ns_return -binary as well. first -binary flag is optional so it will be compatible with the old API. Let me try this. Zoran Vasiljevic wrote: > > Am 10.06.2005 um 15:41 schrieb Vlad Seryakov: > >> * Tcl_GetByteArrayFromObj -- >> * >> * Attempt to get the array of bytes from the Tcl object. If the >> * object is not already a ByteArray object, an attempt will be >> * made to convert it to one. >> >> So, if i call ns_return from Tcl and pass data parameter, it will be >> always type of String. ByteArrays are created from Tcl by binary >> command only, other commands work with String types, so i need to >> tell ns_return to treat data as bytearray. Tcl string >> can contain binary data but it is still String and that check will >> never work for binary data. >> > > I'm afraid you are right. I also have my own (binary-aware) ns_return > somewhere > in my toolbox but never thought it would be of general interest. > > OTOH, the "ns_return -binary" would look nicer but I do not > know if we'd be backwardly-compatible (guess not). > > Zoran > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. Play to > win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |