summaryrefslogtreecommitdiffstats
path: root/unix/dltest/pkgooa.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-10-14 08:36:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-10-14 08:36:43 (GMT)
commitac19e6474a5c208c54f4411496b3b85ffd3e174a (patch)
tree3567f8c1bcb8eb81e6c3d4c3ea26d8d177df878b /unix/dltest/pkgooa.c
parentf733ed21e53f84b8359aa0130c90b30318123f67 (diff)
parent71bcf95b719518cd64e068921561bcd2a503598e (diff)
downloadtcl-ac19e6474a5c208c54f4411496b3b85ffd3e174a.zip
tcl-ac19e6474a5c208c54f4411496b3b85ffd3e174a.tar.gz
tcl-ac19e6474a5c208c54f4411496b3b85ffd3e174a.tar.bz2
merge trunk
Diffstat (limited to 'unix/dltest/pkgooa.c')
-rw-r--r--unix/dltest/pkgooa.c40
1 files changed, 16 insertions, 24 deletions
diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c
index 7276c2c..f4602d1 100644
--- a/unix/dltest/pkgooa.c
+++ b/unix/dltest/pkgooa.c
@@ -11,16 +11,8 @@
*/
#undef STATIC_BUILD
-#include "tclOO.h"
+#include "tclOOInt.h"
#include <string.h>
-
-/*
- * Prototypes for procedures defined later in this file:
- */
-
-static int Pkgooa_StubsOKObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-
/*
*----------------------------------------------------------------------
@@ -72,26 +64,22 @@ Pkgooa_StubsOKObjCmd(
*----------------------------------------------------------------------
*/
-static Tcl_Object copyObjectInstance(Tcl_Interp *interp,
- Tcl_Object source, const char *name, const char *nameSpace)
-{
- Tcl_Object result;
- result = Tcl_CopyObjectInstance(interp, source, name, nameSpace);
- if (result == NULL) {
- Tcl_AppendResult(interp, "ERROR: copy failed.");
- }
- return result;
-}
-
static TclOOStubs stubsCopy = {
TCL_STUB_MAGIC,
NULL,
- copyObjectInstance
- /* more entries here, but those are not
- * needed for this test-case. */
+ /* It doesn't really matter what implementation of
+ * Tcl_CopyObjectInstance is put in the "pseudo"
+ * 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. */
};
-DLLEXPORT int
+extern DLLEXPORT int
Pkgooa_Init(
Tcl_Interp *interp) /* Interpreter in which the package is to be
* made available. */
@@ -113,6 +101,10 @@ Pkgooa_Init(
Tcl_AppendResult(interp, "TclOO stubs are not inialized");
return TCL_ERROR;
}
+ if (tclOOIntStubsPtr == NULL) {
+ Tcl_AppendResult(interp, "TclOO internal stubs are not inialized");
+ return TCL_ERROR;
+ }
/* Test case for Bug [f51efe99a7].
*