[Python-Dev] review/proof docs about private memory heap

2016-04-03 Thread J.E. Ogden
After digging through obmalloc.c to optimize some memory intensive code, I put a paper together on the entire private memory heap that may or may not be a useful addition to docs. I was hoping someone could review/proof it for errors in content. Not sure the policy on links but I've uploaded it

Re: [Python-Dev] Py_SETREF vs. Py_XSETREF

2016-04-03 Thread Armin Rigo
Hi, On 3 April 2016 at 15:29, MRAB wrote: >> Should we rename Py_SETREF to Py_XSETREF and introduce new Py_SETREF >> that uses Py_DECREF? > > Checking for NULL is convenient (and safer), but, on the other hand, it > _would_ be consistent with the others. My 2 cents

Re: [Python-Dev] Py_SETREF vs. Py_XSETREF

2016-04-03 Thread MRAB
On 2016-04-03 08:32, Serhiy Storchaka wrote: Originally I proposed a pair of macros for safe reference replacing to reflects the duality of Py_DECREF/Py_XDECREF. [1], [2] The one should use Py_DECREF and the other should use Py_XDECREF. But then I got a number of voices for the single name

[Python-Dev] Py_SETREF vs. Py_XSETREF

2016-04-03 Thread Serhiy Storchaka
Originally I proposed a pair of macros for safe reference replacing to reflects the duality of Py_DECREF/Py_XDECREF. [1], [2] The one should use Py_DECREF and the other should use Py_XDECREF. But then I got a number of voices for the single name [3], and no one voice (except mine) for the