Overview
| Artifact ID: | cdc2f9ba0fd7b611893f365c2809aec429a488d5 |
|---|---|
| Ticket: | 823486ffffffffffffffffffffffffffffffffff
TIP 100 Reference Implementation - Unload |
| User & Date: | vincentdarley on 2003-10-14 22:51:10 |
Changes
- icomment:
Logged In: YES user_id=32170 I have to agree with Joe -- the changes, if any, to make this work with vfs are likely to be small, and a good TIP should really mesh with what Tcl provides in a relatively complete way. Having said all that, I'm not 100% sure much extra is actually needed. This is because the current vfs implementations don't actually know that a .dll has been loaded, because we can't load directly and so instead a copy-to-native-and-load approach is used. On Unices where the temp copy can be deleted immediately (line 2621 of tclIOUtil.c) George's code will definitely work 100%. On Windows/Mac/Unices-which-can't-delete then we fall through to a setup where Tcl will delete the file on exit. In this case I believe the patch's use of TclpFindSymbol will fail because it's not operating on a native load handle, but rather on an 'FsDivertLoad*' structure which contains a native load handle. It is this case that ought, probably, to be dealt with better by the patch. I believe the solution is to make a new Tcl_FSLoadFileEx which is like Tcl_FSLoadFile except it can return 4 procs ptrs (2 for init, 2 for uninit), for 4 different symbols that it is given -- in fact for future expandability, it might be better if it used an array of procPtrs/symbol names and a number of elements. The old Tcl_FSLoadFile can just wrap around this new proc and be made available purely for backwards compatibility. Then the Tcl command 'load' should call 'Tcl_FSLoadFileEx' and the rest of the patch is basically the same. hope that makes sense -- it just means there is one more function to be adjusted in tclIOUtil.c.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"