Code review comment for lp:~mnordhoff/bzr/statictuple-pickling

Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

John A Meinel wrote:
> ^- PyTuple_SET_ITEM doesn't INCREF, it 'steals' a reference. This is ok
> for 'as_tuple' because you are transferring ownership from
> StaticTuple_as_tuple. However it is not ok for StaticTuple_Type. So you
> just need to add
>
> Py_INCREF(&StaticTuple_Type)
>
> I think it would probably also be good to test that pickling a nested
> StaticTuple works, but otherwise this looks good to me. (as long as we
> add the one Py_INCREF call.)

Done and done. Thank you! :-)

I thought the test was getting a little unwieldy, so I split it up into
3 methods. I hope you don't mind.

Incremental diff:

<http://bzr.mattnordhoff.com/loggerhead/bzr/statictuple-pickling/revision/4779>
--

« Back to merge proposal