Message290052
About _PY_ONCEVAR_INIT() vs _Py_IDENTIFIER.
Using _Py_IDENTIFIER works well if you have an API accepting directly a _Py_IDENTIFIER*. If you call functions requesting a PyObject*, you need to call _PyUnicode_FromId() and test for failure. If you start by calling _PyUnicode_FromId() when the object is not initialized yet, above you have to use var.object, whereas previously Serhiy and Nick weren't confortable with this specific case.
I prefer to use _PY_ONCEVAR_INIT() to keep a regular PyObject* variable and makes the code simpler. |
|
Date |
User |
Action |
Args |
2017-03-23 16:30:26 | vstinner | set | recipients:
+ vstinner, ncoghlan, eric.snow, serhiy.storchaka |
2017-03-23 16:30:26 | vstinner | set | messageid: <1490286626.36.0.729120421482.issue29881@psf.upfronthosting.co.za> |
2017-03-23 16:30:26 | vstinner | link | issue29881 messages |
2017-03-23 16:30:26 | vstinner | create | |
|