Overview
| Artifact ID: | f5c81f51dca873ffb957af451fa35027bfc4418a |
|---|---|
| Ticket: | 1176470fffffffffffffffffffffffffffffffff
Invoke *_*Init() for each [load] |
| User & Date: | eriklns on 2005-04-06 23:52:09 |
Changes
- icomment:
Logged In: YES user_id=113903 The manual page for [load] says: "If a given fileName is loaded into multiple interpreters, then the first load will load the code and call the initialization procedure; subsequent loads will call the initialization procedure without loading the code again. It is not possible to unload or reload a package." I've tested this with a small package "loadtest", by letting Loadtest_Init emit a message to stdout. When exercising the following at the Tcl prompt you will find that the message is emitted with the first [load] command. I didn't see that message when issuing the command the second time and the namespace ::loadtest, created at the first load, then deleted with ::loadtest::terminate, was not recreated with the second [load]. % load ./loadtest/loadtest.so % namespace exists ::loadtest 1 % loadtest::terminate % namespace exists ::loadtest 0 % info loaded {./loadtest/loadtest.so Loadtest} {{} Tk} % load {} Loadtest % namespace exists ::loadtest 0 % Therefore, I believe that the _Init proc is not called a second time as the man page desscribes. The C code with build script has been uploaded. - login: "eriklns"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "eriklns"