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 Side-by-Side Diffs Ignore Whitespace Patch

Changes to tip/531.md.

    58     58                   Tcl_InitStubs(interp, version, exact) == NULL ||
    59     59                   Tcl_PkgRequire(interp, "Tcl", version, exact) == NULL) {
    60     60               return NULL;
    61     61           }
    62     62   
    63     63           return interp;
    64     64       }
           65  +
           66  +## Example use
           67  +
           68  +    #include <tcl.h>
           69  +
           70  +    main()
           71  +    {
           72  +        Tcl_Interp *interp = Tcl_CreateInterpWithStubs("8.7", 0);
           73  +        if(interp) {
           74  +            Tcl_Eval(interp, "puts [clock format [clock seconds]]");
           75  +        } else {
           76  +            fprintf(stderr, "Tcl_CreateInterpWithStubs failed\n");
           77  +        }
           78  +    }
           79  +
    65     80   
    66     81   # Implementation
    67     82   
    68         -Please refer to the `tip-???` branch of the core Tcl repository.
           83  +Please refer to the `tip-531` branch of the core Tcl repository.
    69     84   
    70     85   # Backwards Compatibility
    71     86   
    72     87   This is a new function in the TCL C API.
    73     88   
    74     89   # Copyright
    75     90   
    76     91   This document has been placed in the public domain.