Check-in [45ac09482b]

Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

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

Overview
Comment:Add example of how Tcl_CreateInterpWithStubs is used for TIP 531.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:45ac09482b81e53f04873675266837432c886d92e7784398614a54fe1bba0bb5
User & Date: resuna 2019-04-08 17:05:02
Context
2019-04-10
19:52
New TIP: Externalize libtommath check-in: 4ddb2570c5 user: jan.nijtmans tags: trunk
2019-04-08
17:05
Add example of how Tcl_CreateInterpWithStubs is used for TIP 531. check-in: 45ac09482b user: resuna tags: trunk
2019-04-07
16:05
typo's check-in: 9a69e32f8f user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tip/531.md.

58
59
60
61
62
63
64















65
66
67
68
69
70
71
72
73
74
75
76
                Tcl_InitStubs(interp, version, exact) == NULL ||
                Tcl_PkgRequire(interp, "Tcl", version, exact) == NULL) {
            return NULL;
        }

        return interp;
    }
















# Implementation

Please refer to the `tip-???` branch of the core Tcl repository.

# Backwards Compatibility

This is a new function in the TCL C API.

# Copyright

This document has been placed in the public domain.







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



|








58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
                Tcl_InitStubs(interp, version, exact) == NULL ||
                Tcl_PkgRequire(interp, "Tcl", version, exact) == NULL) {
            return NULL;
        }

        return interp;
    }

## Example use

    #include <tcl.h>

    main()
    {
        Tcl_Interp *interp = Tcl_CreateInterpWithStubs("8.7", 0);
        if(interp) {
            Tcl_Eval(interp, "puts [clock format [clock seconds]]");
        } else {
            fprintf(stderr, "Tcl_CreateInterpWithStubs failed\n");
        }
    }


# Implementation

Please refer to the `tip-531` branch of the core Tcl repository.

# Backwards Compatibility

This is a new function in the TCL C API.

# Copyright

This document has been placed in the public domain.