-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add cpptcl_runtime It can be difficult to get the headers, tcl.h and cpptcl.h in correct order and settings when creating the first interpreter. The new global function Tcl_CreateInterpWithStubs(const char *version, int exact) make this easier as the library, cpptcl_runtime, is compiled without stubs. cpptcl end users can now get tcl.h from cpptcl.h. They can also create interpreters by changing Tcl_CreateInterp() -> Tcl_CreateInterpWithStubs() and they can remote the initialization calls. * Add Tcl_CreateInterpWithStubs Add a helper function for TCL interpreter creation. * Change to static library. cpptcl_runtime is now static library. Add missing PIC flags to link. No effect for static, but forgetting that is a hassle.
- Loading branch information
Showing
6 changed files
with
29 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <tcl.h> | ||
|
||
Tcl_Interp * Tcl_CreateInterpWithStubs(const char *version, int exact) | ||
{ | ||
Tcl_Interp *interp = Tcl_CreateInterp(); | ||
|
||
if (Tcl_Init(interp) == TCL_ERROR | ||
|| Tcl_InitStubs(interp, version, exact) == NULL | ||
|| Tcl_PkgRequire(interp, "Tcl", version, exact) == NULL) { | ||
return NULL; | ||
} | ||
|
||
return interp; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters