Tcl Source Code

Check-in [16e24baac7]
Login

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

Overview
Comment:Add dummy 0 parameter (unused flags) to internal Tcl_FSLoadFileProc call, for upwards compatibility with version 2 filesystems
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 16e24baac7085d2da68b03367c1e6798d3a1fc30
User & Date: jan.nijtmans 2012-10-24 11:21:31
Context
2012-11-05
20:19
Update changes for 8.5.13. check-in: c83c57ad2d user: dgp tags: core-8-5-branch
18:38
Release branch for Tcl 8.5.13. check-in: b4e06ef649 user: dgp tags: core-8-5-13-rc
2012-10-24
11:28
make tclTest.c compilable against version 2 filesystems check-in: 69687a01db user: jan.nijtmans tags: trunk
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
11:14
Add dummy 0 parameter (unused flags) to internal Tcl_FSLoadFileProc call, for upwards compatibility... check-in: bf7740a5d3 user: jan.nijtmans tags: core-8-4-branch
2012-10-23
21:45
Remove unused TclpLoadFile function. check-in: fa1b4b9d54 user: jan.nijtmans tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclIOUtil.c.

3145
3146
3147
3148
3149
3150
3151



3152
3153
3154
3155
3156
3157
3158
 * Side effects:
 *	New code suddenly appears in memory. This may later be unloaded by
 *	passing the clientData to the unloadProc.
 *
 *----------------------------------------------------------------------
 */




int
TclLoadFile(
    Tcl_Interp *interp,		/* Used for error reporting. */
    Tcl_Obj *pathPtr,		/* Name of the file containing the desired
				 * code. */
    int symc,			/* Number of symbols/procPtrs in the next two
				 * arrays. */







>
>
>







3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
 * Side effects:
 *	New code suddenly appears in memory. This may later be unloaded by
 *	passing the clientData to the unloadProc.
 *
 *----------------------------------------------------------------------
 */

typedef int (Tcl_FSLoadFileProc2) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
	Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr, int flags);

int
TclLoadFile(
    Tcl_Interp *interp,		/* Used for error reporting. */
    Tcl_Obj *pathPtr,		/* Name of the file containing the desired
				 * code. */
    int symc,			/* Number of symbols/procPtrs in the next two
				 * arrays. */
3185
3186
3187
3188
3189
3190
3191

3192
3193
3194
3195
3196
3197
3198
3199
    if (fsPtr == NULL) {
	Tcl_SetErrno(ENOENT);
	return TCL_ERROR;
    }

    proc = fsPtr->loadFileProc;
    if (proc != NULL) {

	int retVal = (*proc)(interp, pathPtr, handlePtr, unloadProcPtr);
	if (retVal == TCL_OK) {
	    if (*handlePtr == NULL) {
		return TCL_ERROR;
	    }

	    /*
	     * Copy this across, since both are equal for the native fs.







>
|







3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
    if (fsPtr == NULL) {
	Tcl_SetErrno(ENOENT);
	return TCL_ERROR;
    }

    proc = fsPtr->loadFileProc;
    if (proc != NULL) {
	int retVal = ((Tcl_FSLoadFileProc2 *)proc)
		(interp, pathPtr, handlePtr, unloadProcPtr, 0);
	if (retVal == TCL_OK) {
	    if (*handlePtr == NULL) {
		return TCL_ERROR;
	    }

	    /*
	     * Copy this across, since both are equal for the native fs.

Changes to generic/tclTest.c.

475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
    &TestReportCreateDirectory,
    &TestReportRemoveDirectory,
    &TestReportDeleteFile,
    &TestReportCopyFile,
    &TestReportRenameFile,
    &TestReportCopyDirectory,
    &TestReportLstat,
    &TestReportLoadFile,
    NULL /* cwd */,
    &TestReportChdir
};

static Tcl_Filesystem simpleFilesystem = {
    "simple",
    sizeof(Tcl_Filesystem),







|







475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
    &TestReportCreateDirectory,
    &TestReportRemoveDirectory,
    &TestReportDeleteFile,
    &TestReportCopyFile,
    &TestReportRenameFile,
    &TestReportCopyDirectory,
    &TestReportLstat,
    (Tcl_FSLoadFileProc *) &TestReportLoadFile,
    NULL /* cwd */,
    &TestReportChdir
};

static Tcl_Filesystem simpleFilesystem = {
    "simple",
    sizeof(Tcl_Filesystem),