Skip to content
Tcl Source Code Changes To branch/c11-printf-result
Login

Changes To branch/c11-printf-result

Changes to "branch/c11-printf-result" between 2025-10-14 20:33:52 and 2025-10-23 12:58:21

1

2
3
4
5

1
2
3
4
5
-
+




This is based on the much wider changes in the `c-std-update` branch.
This is based on the much wider changes in the [`c-std-update`](https://core.tcl-lang.org/tcl/timeline?r=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.