456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
|
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
|
-
+
|
ipFirstPtr = Tcl_GetAssocData(target, "tclLoad", NULL);
ipPtr = (InterpPackage *) ckalloc(sizeof(InterpPackage));
ipPtr->pkgPtr = pkgPtr;
ipPtr->nextPtr = ipFirstPtr;
Tcl_SetAssocData(target, "tclLoad", LoadCleanupProc, ipPtr);
} else {
TclTransferResult(target, code, interp);
Tcl_TransferResult(target, code, interp);
}
done:
Tcl_DStringFree(&pkgName);
Tcl_DStringFree(&initName);
Tcl_DStringFree(&safeInitName);
Tcl_DStringFree(&unloadName);
|
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
|
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
|
-
+
|
if (safeRefCount <= 0 && trustedRefCount <= 0) {
code = TCL_UNLOAD_DETACH_FROM_PROCESS;
}
}
code = unloadProc(target, code);
if (code != TCL_OK) {
TclTransferResult(target, code, interp);
Tcl_TransferResult(target, code, interp);
goto done;
}
/*
* The unload function executed fine. Examine the reference count to see
* if we unload the DLL.
*/
|