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

Update of ”branch/c11-restrict”

Overview

Artifact ID: 91084af19985d35c17f34a603128f3934577e643a422c513c0ddd650ea9a1bce
Page Name:branch/c11-restrict
Date: 2025-11-21 14:44:51
Original User: dkf
Next aeb58dfa5ead41275be136c2ca18c77cc0eabd8ddf8e180902735aa6f895b89b
Content

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. Or would be except those never touched `restrict`.

For the most part, it's `OUT` (or `IN/OUT`) parameters (or technically pointers to them) that are marked as `restrict` because we _really_ assume they don't alias nastily. A number of functions in our public API ought to also be so marked on an appropriate argument, especially `Tcl_GetWideIntFromObj()` and so on; it's typically pretty obvious what ought to have the treatment. If we were doing it _properly,_ almost every instance of a `Tcl_Interp*` argument would be `restrict`, but the usual TBAA rules of modern compilers are good enough.