Tcl Source Code

Check-in [a88be5763c]
Login

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

Overview
Comment:add proper runtime-detection to pkgb.so
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a88be5763cc4e842e6b957aca1f93d35fc526518
User & Date: jan.nijtmans 2012-12-07 15:51:25
Context
2012-12-07
15:53
fix failing test check-in: 0443331428 user: jan.nijtmans tags: trunk
15:51
add proper runtime-detection to pkgb.so check-in: a88be5763c user: jan.nijtmans tags: trunk
14:53
Extended test of [load]ing Tcl 8 compiled extension into Tcl 9 interp. check-in: 65b793e46a user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to unix/dltest/pkgb.c.

93
94
95
96
97
98
99





100
101
102
103
104
105
106
107
108




109
110
111
112
113
114
115
    ClientData dummy,		/* Not used. */
    Tcl_Interp *interp,		/* Current interpreter. */
    int objc,			/* Number of arguments. */
    Tcl_Obj *const objv[])	/* Argument objects. */
{
    return Tcl_EvalEx(interp, "list unsafe command invoked", -1, TCL_EVAL_GLOBAL);
}






static int
Pkgb_DemoObjCmd(
    ClientData dummy,		/* Not used. */
    Tcl_Interp *interp,		/* Current interpreter. */
    int objc,			/* Number of arguments. */
    Tcl_Obj *const objv[])	/* Argument objects. */
{
    const char *foo = Tcl_GetDefaultEncodingDir();




    return TCL_OK;
}

/*
 *----------------------------------------------------------------------
 *
 * Pkgb_Init --







>
>
>
>
>








|
>
>
>
>







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
    ClientData dummy,		/* Not used. */
    Tcl_Interp *interp,		/* Current interpreter. */
    int objc,			/* Number of arguments. */
    Tcl_Obj *const objv[])	/* Argument objects. */
{
    return Tcl_EvalEx(interp, "list unsafe command invoked", -1, TCL_EVAL_GLOBAL);
}

#if (TCL_MAJOR_VERSION > 8)
#  define Tcl_GetDefaultEncodingDir ((const char *(*)(void)) \
     ((&(tclStubsPtr->tcl_PkgProvideEx))[341]))
#endif

static int
Pkgb_DemoObjCmd(
    ClientData dummy,		/* Not used. */
    Tcl_Interp *interp,		/* Current interpreter. */
    int objc,			/* Number of arguments. */
    Tcl_Obj *const objv[])	/* Argument objects. */
{
    if(!Tcl_GetDefaultEncodingDir) {
	Tcl_SetObjResult(interp, Tcl_NewStringObj("not supported", -1));
	return TCL_ERROR;
    }
    Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_GetDefaultEncodingDir(), -1));
    return TCL_OK;
}

/*
 *----------------------------------------------------------------------
 *
 * Pkgb_Init --