From: SourceForge.net <no...@so...> - 2009-05-11 14:13:12
|
Feature Requests item #219291, was opened at 2000-10-26 06:10 Message generated for change (Comment added) made by dkf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=360894&aid=219291&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 09. Linked C Variables Group: obsolete: 8.4a3 >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Donal K. Fellows (dkf) Summary: Support for Linking Tcl Variables and C Variables Containing Initial Comment: OriginalBugID: 2275 RFE Version: 8.0.4 SubmitDate: '1999-06-21' LastModified: '2000-10-25' Severity: LOW Status: UnAssn Submitter: techsupp OS: Solaris OSVersion: 2.7 Machine: Other FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Donal K. Fellows Comments: This code has been tested and found to work fine on Solaris (various versions,) SunOS 4.1 (where it was developed) and Linux (various versions) DesiredBehavior: This enhancement to the general mechanism for linking Tcl and C variables allows code that wishes to link an internal variable that contains a reference to a Tcl_Obj structure to the general Tcl-level interface to do so far more efficiently. In particular, it prevents the (sometimes significant) degradation in performance that would otherwise be necessary if a scheme based on the standard Tcl_LinkVar() behaviour was used (which would be due to the conversion between strings and values) and can efficiently cope with any objects a programmer may wish to pass. The changes that I've made are currently structured as being in separate files, and as such they have no general impact upon the rest of Tcl. Integrating them should be a breeze (apart from writing the documentation and test suite <sigh>) As the code has been in serious use for around 2 years now (as part of a scheme to link properties of objects to Tcl variables so they can be joined to Tk entry widgets in an OO scheme I'm using in an application I'm working on,) I fully expect it to be free of bugs. In particular, the code has no internal memory leaks (when used correctly, of course) and nor does it leak references or cause anything to get freed to early (which was the source of many wierd bugs, admittedly...) My implementation of the above feature (I emphasize that this is *not* a patch) and some minimalist documentation is available at: http://www.cs.man.ac.uk/~fellowsd/tcl/#scripts/linkObj I do not class this request-for-enhancement-inclusion as a show-stopper at all, since I have to use enhanced interpreters in any case (there is the rest of the OO code, and some proprietory display enhancements, all of which are absolute necessities at the moment.) ---------------------------------------------------------------------- >Comment By: Donal K. Fellows (dkf) Date: 2009-05-11 15:13 Message: 8.5 onwards supports linking of a wider range of basic types, but not of Tcl_Objs; those are perhaps best done directly through traces. In any case, I'm not pushing for this one any more. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2004-10-04 15:00 Message: Logged In: YES user_id=79902 There has also been interest shown on c.l.t for linking with float (single-precision IEEE) variables. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=360894&aid=219291&group_id=10894 |