1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
-
+
|
/*
* tclLoad.c --
*
* This file provides the generic portion (those that are the same on all
* platforms) of Tcl's dynamic loading facilities.
*
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclLoad.c,v 1.19 2008/10/04 12:54:14 nijtmans Exp $
* RCS: @(#) $Id: tclLoad.c,v 1.20 2008/10/16 22:34:18 nijtmans Exp $
*/
#include "tclInt.h"
/*
* The following structure describes a package that has been loaded either
* dynamically (with the "load" command) or statically (as indicated by a call
|
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
|
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
|
-
+
|
Tcl_DString pkgName, tmp;
Tcl_PackageUnloadProc *unloadProc;
InterpPackage *ipFirstPtr, *ipPtr;
int i, index, code, complain = 1, keepLibrary = 0;
int trustedRefCount = -1, safeRefCount = -1;
const char *fullFileName = "";
char *packageName;
static const char *options[] = {
static const char *const options[] = {
"-nocomplain", "-keeplibrary", "--", NULL
};
enum options {
UNLOAD_NOCOMPLAIN, UNLOAD_KEEPLIB, UNLOAD_LAST
};
for (i = 1; i < objc; i++) {
|