1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
-
|
/*
* pkgooa.c --
*
* This file contains a simple Tcl package "pkgooa" that is intended for
* testing the Tcl dynamic loading facilities.
*
* Copyright (c) 1995 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
#undef STATIC_BUILD
#include "tclOO.h"
#include <string.h>
/*
*----------------------------------------------------------------------
*
* Pkgooa_StubsOKObjCmd --
|
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
-
+
+
+
+
+
+
+
+
+
|
* stub table, since the test-case never actually
* calls this function. All that matters is that it's
* a function with a different memory address than
* the real Tcl_CopyObjectInstance function in Tcl. */
(Tcl_Object (*) (Tcl_Interp *, Tcl_Object, const char *,
const char *t)) Pkgooa_StubsOKObjCmd
/* More entries could be here, but those are not used
* needed for this test-case. So, being NULL is OK. */
* for this test-case. So, being NULL is OK. */
};
extern DLLEXPORT int
Pkgooa_Init(
Tcl_Interp *interp) /* Interpreter in which the package is to be
* made available. */
{
int code;
/* Any TclOO extension which uses stubs, calls
* both Tcl_InitStubs and Tcl_OOInitStubs() and
* does not use any Tcl 8.6 features should be
* loadable in Tcl 8.5 as well, provided the
* TclOO extension (for Tcl 8.5) is installed.
* This worked in Tcl 8.6.0, and is expected
* to keep working in all future Tcl 8.x releases.
*/
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
if (tclStubsPtr == NULL) {
Tcl_AppendResult(interp, "Tcl stubs are not inialized, "
"did you compile using -DUSE_TCL_STUBS? ");
return TCL_ERROR;
|