Tcl Source Code

Check-in [bf7740a5d3]
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-4-branch
Files: files | file ages | folders
SHA1: bf7740a5d34bfadb972c21a232256c9afca3562f
User & Date: jan.nijtmans 2012-10-24 11:14:51
Context
2012-11-07
15:28
needed for complation with mingw-w64 (autoconf still to be run) check-in: e00aa2ec0b user: jan.nijtmans tags: core-8-4-branch
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
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-03
15:22
When checking for std channels being closed, compare the channel state, not the channel itself so th... check-in: 1b7584406b user: dgp tags: core-8-4-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclIOUtil.c.

2770
2771
2772
2773
2774
2775
2776



2777
2778
2779
2780
2781
2782
2783
 * Side effects:
 *	New code suddenly appears in memory.  This may later be
 *	unloaded by passing the clientData to the unloadProc.
 *
 *----------------------------------------------------------------------
 */




int
Tcl_FSLoadFile(interp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr, 
	       handlePtr, unloadProcPtr)
    Tcl_Interp *interp;		/* Used for error reporting. */
    Tcl_Obj *pathPtr;		/* Name of the file containing the desired
				 * code. */
    CONST char *sym1, *sym2;	/* Names of two procedures to look up in







>
>
>







2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
 * 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
Tcl_FSLoadFile(interp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr, 
	       handlePtr, unloadProcPtr)
    Tcl_Interp *interp;		/* Used for error reporting. */
    Tcl_Obj *pathPtr;		/* Name of the file containing the desired
				 * code. */
    CONST char *sym1, *sym2;	/* Names of two procedures to look up in
2793
2794
2795
2796
2797
2798
2799

2800
2801
2802
2803
2804
2805
2806
2807
                                 * function which should be used for
                                 * this file. */
{
    Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr);
    if (fsPtr != NULL) {
	Tcl_FSLoadFileProc *proc = fsPtr->loadFileProc;
	if (proc != NULL) {

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







>
|







2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
                                 * function which should be used for
                                 * this file. */
{
    Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr);
    if (fsPtr != NULL) {
	Tcl_FSLoadFileProc *proc = fsPtr->loadFileProc;
	if (proc != NULL) {
	    int retVal = ((Tcl_FSLoadFileProc2 *)proc)
		    (interp, pathPtr, handlePtr, unloadProcPtr, 0);
	    if (retVal != TCL_OK) {
		return retVal;
	    }
	    if (*handlePtr == NULL) {
		return TCL_ERROR;
	    }
	    if (sym1 != NULL) {

Changes to generic/tclTest.c.

464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
    &TestReportCreateDirectory,
    &TestReportRemoveDirectory, 
    &TestReportDeleteFile,
    &TestReportCopyFile,
    &TestReportRenameFile,
    &TestReportCopyDirectory, 
    &TestReportLstat,
    &TestReportLoadFile,
    NULL /* cwd */,
    &TestReportChdir
};

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







|







464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
    &TestReportCreateDirectory,
    &TestReportRemoveDirectory, 
    &TestReportDeleteFile,
    &TestReportCopyFile,
    &TestReportRenameFile,
    &TestReportCopyDirectory, 
    &TestReportLstat,
    (Tcl_FSLoadFileProc *) &TestReportLoadFile,
    NULL /* cwd */,
    &TestReportChdir
};

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