Overview
| Artifact ID: | 86840b0f2a0b779efef3d0423206976cdc96c25c347e8c89c6dbca2417f9208b |
|---|---|
| Page Name: | branch/c11-printf-result |
| Date: | 2025-10-23 12:58:21 |
| Original User: | dkf |
| Mimetype: | text/x-markdown |
| Parent: | af1ab761186d38f248c4e4faa4bf03ed476d16c2de57245fa51bd6608d316089 (diff) |
Content
This is based on the much wider changes in the c-std-update branch.
This uses C11 variadic macros to create especially TclPrintfResult(), which gives us back approximately the feeling of doing sprintf(interp->result, ...) from Tcl 7, except now in a Tcl_Obj-safe way. It's been used in this branch almost entirely for handling errors, which are typically not regarded as performance-critical.
This is a feature that is recommended for adoption. We may want to promote
TclPrintfResult()to the public API; it requires no new functions, as it is only a source-level feature. That is out of scope of this branch.