Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
gh-145860: Document steal semantics in header declarations
Add comments to _PyInterpolation_Build and _PyTemplate_Build
declarations in pycore_interpolation.h and pycore_template.h.
  • Loading branch information
aleksandr.tseluyko committed Apr 7, 2026
commit df663cabfe27fd7b662488b135dbe1e30aaf6814
1 change: 1 addition & 0 deletions Include/internal/pycore_interpolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ extern PyTypeObject _PyInterpolation_Type;

#define _PyInterpolation_CheckExact(op) Py_IS_TYPE((op), &_PyInterpolation_Type)

// Steals references to value, str, and format_spec (even on failure).
PyAPI_FUNC(PyObject *) _PyInterpolation_Build(PyObject *value, PyObject *str,
int conversion, PyObject *format_spec);

Expand Down
1 change: 1 addition & 0 deletions Include/internal/pycore_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ extern PyTypeObject _PyTemplateIter_Type;

extern PyObject *_PyTemplate_Concat(PyObject *self, PyObject *other);

// Steals references to strings and interpolations (even on failure).
PyAPI_FUNC(PyObject *) _PyTemplate_Build(PyObject *strings, PyObject *interpolations);

#ifdef __cplusplus
Expand Down
Loading