13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
*
* Copyright (c) 1991-1994 The Regents of the University of California.
* Copyright (c) 1994-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: tclIOUtil.c,v 1.88 2003/11/03 12:49:31 vincentdarley Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
#ifdef MAC_TCL
#include "tclMacInt.h"
#endif
|
|
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
*
* Copyright (c) 1991-1994 The Regents of the University of California.
* Copyright (c) 1994-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: tclIOUtil.c,v 1.89 2003/11/07 11:36:47 vincentdarley Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
#ifdef MAC_TCL
#include "tclMacInt.h"
#endif
|
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
|
* file which will be passed back to
* (*unloadProcPtr)() to unload the file. */
Tcl_FSUnloadFileProc **unloadProcPtr;
/* Filled with address of Tcl_FSUnloadFileProc
* function which should be used for
* this file. */
{
CONST char *symbols[] = { sym1, sym2 };
Tcl_PackageInitProc **procPtrs[] = { proc1Ptr, proc2Ptr };
ClientData clientData;
int res;
res = TclLoadFile(interp, pathPtr, 2, symbols, procPtrs,
handlePtr, &clientData, unloadProcPtr);
/*
* Due to an unfortunate mis-design in Tcl 8.4 fs, when loading a
* shared library, we don't keep the loadHandle (for TclpFindSymbol)
* and the clientData (for the unloadProc) separately. In fact we
|
|
|
>
>
>
>
>
>
>
|
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
|
* file which will be passed back to
* (*unloadProcPtr)() to unload the file. */
Tcl_FSUnloadFileProc **unloadProcPtr;
/* Filled with address of Tcl_FSUnloadFileProc
* function which should be used for
* this file. */
{
CONST char *symbols[2];
Tcl_PackageInitProc **procPtrs[2];
ClientData clientData;
int res;
/* Initialize the arrays */
symbols[0] = sym1;
symbols[1] = sym2;
procPtrs[0] = proc1Ptr;
procPtrs[1] = proc2Ptr;
/* Perform the load */
res = TclLoadFile(interp, pathPtr, 2, symbols, procPtrs,
handlePtr, &clientData, unloadProcPtr);
/*
* Due to an unfortunate mis-design in Tcl 8.4 fs, when loading a
* shared library, we don't keep the loadHandle (for TclpFindSymbol)
* and the clientData (for the unloadProc) separately. In fact we
|