RE: [tcltk-perl] Drop listify [PATCH]
Brought to you by:
hobbs
From: Jeff H. <je...@Ac...> - 2004-04-15 20:07:52
|
> Is there a semantic difference between [list a b c] and {a b c} > in Tcl the language? If not, then I don't think they should be > different when passed to perl either. OH man, oh man ... this is sticky. Yes and no. At the C level, the first is a pure list (perl AV), while the second is just a string. You can stringify the list and listify the string, just as you can convert an SvPV to an AV and back. The trick is that in passing a Tcl_Obj to become and SV, I check the object types first for efficient conversion (trying to reduce round-tripping through strings, which I think you've noticed the positive effect of). I think that I've properly handled it with the recent changes to call and icall. If something is still "not right", please tell me. It's important to be careful, because the way that Tcl will convert a string to a list is indifferent to extra whitespace. The following all represent the same thing in when listified: set var {a b c} set var { a b c } set var {a b c} Jeff |