diff options
| author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2011-04-07 10:19:46 (GMT) |
|---|---|---|
| committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2011-04-07 10:19:46 (GMT) |
| commit | 903ba45e79d000802b114ec1659211b8708b9b58 (patch) | |
| tree | a1673d9cd9ab3c0d3472fa86eaae6bfae568e33c /unix/dltest/pkga.c | |
| parent | e4d579ead5a212d6f43b5abd8fc285b1dbf8e47f (diff) | |
| download | tcl-903ba45e79d000802b114ec1659211b8708b9b58.zip tcl-903ba45e79d000802b114ec1659211b8708b9b58.tar.gz tcl-903ba45e79d000802b114ec1659211b8708b9b58.tar.bz2 | |
Add some (temporary) test cases showing the problem with --export-dynamic
Diffstat (limited to 'unix/dltest/pkga.c')
| -rw-r--r-- | unix/dltest/pkga.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c index c4d3f32..a014458 100644 --- a/unix/dltest/pkga.c +++ b/unix/dltest/pkga.c @@ -29,6 +29,17 @@ static int Pkga_EqObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int Pkga_QuoteObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +/* + * Function to be backlinked from the tcltest executable + */ +#if 0 +extern const char *Tcltest_Foo(); +#else +EXTERN const char *Tcltest_Foo() { + return "I'm in pkga.c"; +} +#endif + /* *---------------------------------------------------------------------- @@ -99,11 +110,15 @@ Pkga_QuoteObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { - if (objc != 2) { + if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "value"); return TCL_ERROR; } + if (objc == 1) { + Tcl_SetResult(interp, (char *) Tcltest_Foo(), TCL_VOLATILE); + } else { Tcl_SetObjResult(interp, objv[1]); + } return TCL_OK; } |
