Skip to content
Tcl Source Code Update of ”branch/c11-printf-result”
Login

Update of ”branch/c11-printf-result”

Overview

Artifact ID: af1ab761186d38f248c4e4faa4bf03ed476d16c2de57245fa51bd6608d316089
Page Name:branch/c11-printf-result
Date: 2025-10-14 20:33:52
Original User: dkf
Mimetype:text/x-markdown
Parent: c6dbca27adf9415b6b6792f366a274581f6191e8d3f95142fd090eff4155a159 (diff)
Next 86840b0f2a0b779efef3d0423206976cdc96c25c347e8c89c6dbca2417f9208b
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.