STINNER Victor added the comment:

#define _Py_ONCE_VAR(var_decl, var) \
      var_decl var = NULL;
      static _Py_OnceVar var ## _once_meta = {.next = NULL, .obj_ref = 
(PyObject **) &var}

Yeah, I had a similar idea, but I fear that it will increase the usage of the C 
stack memory.

See the issue #28858: my old _PyObject_CallArg1() macro allocated an implicit 
array on the stack and increased the stack usage, whereas the purpose of the 
macro was to *reduce* the stack usage (just the opposite!). So I removed the 
macro.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29881>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to