<div>Hi<br></div><div><br></div><div>I have little knowledge of some Python (3.2) internals on objects&#39; internal structure handling.</div><div><br></div><div>Suppose that I have any PyLongObject object (even internal / shared ones) and that</div>
<div>- I need to change some or all of its internal values (size, sign, digits) in a &quot;critical section&quot;;</div><div>- the critical section is C code only;</div><div>- no CPython APIs will be called (all work is on local vars and object&#39;s internal values);</div>
<div>- the object internal structure is completely restored before exiting from the critical section.</div><div><br></div><div>Is it thread / interpreter safe or something dirty can happen?</div><div><br></div><div>Cesare</div>