Tcl Source Code

Check-in [fa1b4b9d54]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove unused TclpLoadFile function.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: fa1b4b9d540614a96747edbd2165fd07af1aff39
User & Date: jan.nijtmans 2012-10-23 21:45:51
Context
2012-10-24
11:21
Add dummy 0 parameter (unused flags) to internal Tcl_FSLoadFileProc call, for upwards compatibility ... check-in: 16e24baac7 user: jan.nijtmans tags: core-8-5-branch
2012-10-23
21:50
Add "flags" parameter from Tcl_LoadFile to to various internal functions, so these flags are availab... check-in: 4d417791c9 user: jan.nijtmans tags: trunk
21:45
Remove unused TclpLoadFile function. check-in: fa1b4b9d54 user: jan.nijtmans tags: core-8-5-branch
2012-10-14
19:00
Bug 357650: Better fix, which helps for all Tcl_DictObjGet() calls in Tcl's source code. check-in: 4f28137715 user: jan.nijtmans tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7





2012-10-14  Jan Nijtmans  <[email protected]>

	* generic/tclDictObj.c: [Bug 3576509]: tcl::Bgerror crashes with invalid
	* generic/tclEvent.c:    arguments. Better fix, which helps for all
	Tcl_DictObjGet() calls in Tcl's source code.

2012-10-13  Jan Nijtmans  <[email protected]>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2012-10-23  Jan Nijtmans  <[email protected]>

	* generic/tclInt.h:    Remove unused TclpLoadFile function.
	* generic/tclIOUtil.c

2012-10-14  Jan Nijtmans  <[email protected]>

	* generic/tclDictObj.c: [Bug 3576509]: tcl::Bgerror crashes with invalid
	* generic/tclEvent.c:    arguments. Better fix, which helps for all
	Tcl_DictObjGet() calls in Tcl's source code.

2012-10-13  Jan Nijtmans  <[email protected]>

Changes to generic/tclIOUtil.c.

3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
	    if (symbols[i] != NULL) {
		*procPtrs[i] = TclpFindSymbol(interp, *handlePtr, symbols[i]);
	    }
	}
    }
    return TCL_OK;
}
/*
 * This function used to be in the platform specific directories, but it has
 * now been made to work cross-platform
 */

int
TclpLoadFile(
    Tcl_Interp *interp,		/* Used for error reporting. */
    Tcl_Obj *pathPtr,		/* Name of the file containing the desired
				 * code (UTF-8). */
    const char *sym1, CONST char *sym2,
				/* Names of two functions to look up in the
				 * file's symbol table. */
    Tcl_PackageInitProc **proc1Ptr, Tcl_PackageInitProc **proc2Ptr,
				/* Where to return the addresses corresponding
				 * to sym1 and sym2. */
    ClientData *clientDataPtr,	/* Filled with token for dynamically loaded
				 * 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. */
{
    Tcl_LoadHandle handle = NULL;
    int res;

    res = TclpDlopen(interp, pathPtr, &handle, unloadProcPtr);

    if (res != TCL_OK) {
	return res;
    }

    if (handle == NULL) {
	return TCL_ERROR;
    }

    *clientDataPtr = (ClientData) handle;

    *proc1Ptr = TclpFindSymbol(interp, handle, sym1);
    *proc2Ptr = TclpFindSymbol(interp, handle, sym2);
    return TCL_OK;
}

/*
 *---------------------------------------------------------------------------
 *
 * TclFSUnloadTempFile --
 *
 *	This function is called when we loaded a library of code via an







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







3434
3435
3436
3437
3438
3439
3440











































3441
3442
3443
3444
3445
3446
3447
	    if (symbols[i] != NULL) {
		*procPtrs[i] = TclpFindSymbol(interp, *handlePtr, symbols[i]);
	    }
	}
    }
    return TCL_OK;
}












































/*
 *---------------------------------------------------------------------------
 *
 * TclFSUnloadTempFile --
 *
 *	This function is called when we loaded a library of code via an

Changes to generic/tclInt.h.

2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
			    int stackSize, int flags);
MODULE_SCOPE int	TclpFindVariable(const char *name, int *lengthPtr);
MODULE_SCOPE void	TclpInitLibraryPath(char **valuePtr,
			    int *lengthPtr, Tcl_Encoding *encodingPtr);
MODULE_SCOPE void	TclpInitLock(void);
MODULE_SCOPE void	TclpInitPlatform(void);
MODULE_SCOPE void	TclpInitUnlock(void);
MODULE_SCOPE int	TclpLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr,
			    const char *sym1, const char *sym2,
			    Tcl_PackageInitProc **proc1Ptr,
			    Tcl_PackageInitProc **proc2Ptr,
			    ClientData *clientDataPtr,
			    Tcl_FSUnloadFileProc **unloadProcPtr);
MODULE_SCOPE Tcl_Obj *	TclpObjListVolumes(void);
MODULE_SCOPE void	TclpMasterLock(void);
MODULE_SCOPE void	TclpMasterUnlock(void);
MODULE_SCOPE int	TclpMatchFiles(Tcl_Interp *interp, char *separators,
			    Tcl_DString *dirPtr, char *pattern, char *tail);
MODULE_SCOPE int	TclpObjNormalizePath(Tcl_Interp *interp,
			    Tcl_Obj *pathPtr, int nextCheckpoint);







<
<
<
<
<
<







2728
2729
2730
2731
2732
2733
2734






2735
2736
2737
2738
2739
2740
2741
			    int stackSize, int flags);
MODULE_SCOPE int	TclpFindVariable(const char *name, int *lengthPtr);
MODULE_SCOPE void	TclpInitLibraryPath(char **valuePtr,
			    int *lengthPtr, Tcl_Encoding *encodingPtr);
MODULE_SCOPE void	TclpInitLock(void);
MODULE_SCOPE void	TclpInitPlatform(void);
MODULE_SCOPE void	TclpInitUnlock(void);






MODULE_SCOPE Tcl_Obj *	TclpObjListVolumes(void);
MODULE_SCOPE void	TclpMasterLock(void);
MODULE_SCOPE void	TclpMasterUnlock(void);
MODULE_SCOPE int	TclpMatchFiles(Tcl_Interp *interp, char *separators,
			    Tcl_DString *dirPtr, char *pattern, char *tail);
MODULE_SCOPE int	TclpObjNormalizePath(Tcl_Interp *interp,
			    Tcl_Obj *pathPtr, int nextCheckpoint);