[Python-Dev] PyLongObject "safe" changes?

Cesare Di Mauro cesare.di.mauro at gmail.com
Sun Mar 20 09:40:03 CET 2011


Hi

I have little knowledge of some Python (3.2) internals on objects' internal
structure handling.

Suppose that I have any PyLongObject object (even internal / shared ones)
and that
- I need to change some or all of its internal values (size, sign, digits)
in a "critical section";
- the critical section is C code only;
- no CPython APIs will be called (all work is on local vars and object's
internal values);
- the object internal structure is completely restored before exiting from
the critical section.

Is it thread / interpreter safe or something dirty can happen?

Cesare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110320/1645e270/attachment.html>


More information about the Python-Dev mailing list