Artifact
6915b52c249190be75c4e67a995207f014d2d63e:
Attachment "tcl-unload.patch" to
ticket [2414803fff]
added by
andygoth
2008-12-11 03:47:57.
0000: 64 69 66 66 20 2d 75 72 20 74 63 6c 38 2e 36 61 diff -ur tcl8.6a
0010: 33 2f 67 65 6e 65 72 69 63 2f 74 63 6c 4c 6f 61 3/generic/tclLoa
0020: 64 2e 63 20 74 63 6c 38 2e 36 61 33 2e 6e 65 77 d.c tcl8.6a3.new
0030: 2f 67 65 6e 65 72 69 63 2f 74 63 6c 4c 6f 61 64 /generic/tclLoad
0040: 2e 63 0a 2d 2d 2d 20 74 63 6c 38 2e 36 61 33 2f .c.--- tcl8.6a3/
0050: 67 65 6e 65 72 69 63 2f 74 63 6c 4c 6f 61 64 2e generic/tclLoad.
0060: 63 09 32 30 30 38 2d 31 30 2d 30 34 20 30 37 3a c.2008-10-04 07:
0070: 35 34 3a 31 34 2e 30 30 30 30 30 30 30 30 30 20 54:14.000000000
0080: 2d 30 35 30 30 0a 2b 2b 2b 20 74 63 6c 38 2e 36 -0500.+++ tcl8.6
0090: 61 33 2e 6e 65 77 2f 67 65 6e 65 72 69 63 2f 74 a3.new/generic/t
00a0: 63 6c 4c 6f 61 64 2e 63 09 32 30 30 38 2d 31 32 clLoad.c.2008-12
00b0: 2d 31 30 20 31 34 3a 34 33 3a 30 36 2e 30 30 30 -10 14:43:06.000
00c0: 30 30 30 30 30 30 20 2d 30 36 30 30 0a 40 40 20 000000 -0600.@@
00d0: 2d 36 34 37 2c 31 31 20 2b 36 34 37 2c 31 31 20 -647,11 +647,11
00e0: 40 40 0a 20 20 20 20 20 7d 0a 20 20 20 20 20 69 @@. }. i
00f0: 66 20 28 70 6b 67 50 74 72 20 3d 3d 20 4e 55 4c f (pkgPtr == NUL
0100: 4c 29 20 7b 0a 20 09 2f 2a 0a 2d 09 20 2a 20 54 L) {. ./*.-. * T
0110: 68 65 20 44 4c 4c 20 70 6f 69 6e 74 65 64 20 62 he DLL pointed b
0120: 79 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 66 y the provided f
0130: 69 6c 65 6e 61 6d 65 20 68 61 73 20 6e 65 76 65 ilename has neve
0140: 72 20 62 65 65 6e 20 6c 6f 61 64 65 64 2e 0a 2b r been loaded..+
0150: 09 20 2a 20 54 68 65 20 44 4c 4c 20 70 6f 69 6e . * The DLL poin
0160: 74 65 64 20 62 79 20 74 68 65 20 70 72 6f 76 69 ted by the provi
0170: 64 65 64 20 66 69 6c 65 6e 61 6d 65 20 69 73 20 ded filename is
0180: 6e 6f 74 20 6c 6f 61 64 65 64 2e 0a 20 09 20 2a not loaded.. . *
0190: 2f 0a 20 0a 20 09 54 63 6c 5f 41 70 70 65 6e 64 /. . .Tcl_Append
01a0: 52 65 73 75 6c 74 28 69 6e 74 65 72 70 2c 20 22 Result(interp, "
01b0: 66 69 6c 65 20 5c 22 22 2c 20 66 75 6c 6c 46 69 file \"", fullFi
01c0: 6c 65 4e 61 6d 65 2c 0a 2d 09 09 22 5c 22 20 68 leName,.-.."\" h
01d0: 61 73 20 6e 65 76 65 72 20 62 65 65 6e 20 6c 6f as never been lo
01e0: 61 64 65 64 22 2c 20 4e 55 4c 4c 29 3b 0a 2b 09 aded", NULL);.+.
01f0: 09 22 5c 22 20 69 73 20 6e 6f 74 20 6c 6f 61 64 ."\" is not load
0200: 65 64 22 2c 20 4e 55 4c 4c 29 3b 0a 20 09 63 6f ed", NULL);. .co
0210: 64 65 20 3d 20 54 43 4c 5f 45 52 52 4f 52 3b 0a de = TCL_ERROR;.
0220: 20 09 67 6f 74 6f 20 64 6f 6e 65 3b 0a 20 20 20 .goto done;.
0230: 20 20 7d 0a 40 40 20 2d 36 37 34 2c 31 31 20 2b }.@@ -674,11 +
0240: 36 37 34 2c 31 31 20 40 40 0a 20 20 20 20 20 7d 674,11 @@. }
0250: 0a 20 20 20 20 20 69 66 20 28 63 6f 64 65 20 21 . if (code !
0260: 3d 20 54 43 4c 5f 4f 4b 29 20 7b 0a 20 09 2f 2a = TCL_OK) {. ./*
0270: 0a 2d 09 20 2a 20 54 68 65 20 70 61 63 6b 61 67 .-. * The packag
0280: 65 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 6c e has not been l
0290: 6f 61 64 65 64 20 69 6e 20 74 68 69 73 20 69 6e oaded in this in
02a0: 74 65 72 70 72 65 74 65 72 2e 0a 2b 09 20 2a 20 terpreter..+. *
02b0: 54 68 65 20 70 61 63 6b 61 67 65 20 69 73 20 6e The package is n
02c0: 6f 74 20 6c 6f 61 64 65 64 20 69 6e 20 74 68 69 ot loaded in thi
02d0: 73 20 69 6e 74 65 72 70 72 65 74 65 72 2e 0a 20 s interpreter..
02e0: 09 20 2a 2f 0a 20 0a 20 09 54 63 6c 5f 41 70 70 . */. . .Tcl_App
02f0: 65 6e 64 52 65 73 75 6c 74 28 69 6e 74 65 72 70 endResult(interp
0300: 2c 20 22 66 69 6c 65 20 5c 22 22 2c 20 66 75 6c , "file \"", ful
0310: 6c 46 69 6c 65 4e 61 6d 65 2c 0a 2d 09 09 22 5c lFileName,.-.."\
0320: 22 20 68 61 73 20 6e 65 76 65 72 20 62 65 65 6e " has never been
0330: 20 6c 6f 61 64 65 64 20 69 6e 20 74 68 69 73 20 loaded in this
0340: 69 6e 74 65 72 70 72 65 74 65 72 22 2c 20 4e 55 interpreter", NU
0350: 4c 4c 29 3b 0a 2b 09 09 22 5c 22 20 69 73 20 6e LL);.+.."\" is n
0360: 6f 74 20 6c 6f 61 64 65 64 20 69 6e 20 74 68 69 ot loaded in thi
0370: 73 20 69 6e 74 65 72 70 72 65 74 65 72 22 2c 20 s interpreter",
0380: 4e 55 4c 4c 29 3b 0a 20 09 63 6f 64 65 20 3d 20 NULL);. .code =
0390: 54 43 4c 5f 45 52 52 4f 52 3b 0a 20 09 67 6f 74 TCL_ERROR;. .got
03a0: 6f 20 64 6f 6e 65 3b 0a 20 20 20 20 20 7d 0a o done;. }.