/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/_static_tuple_c.c

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-11 20:19:38 UTC
  • mfrom: (7526.3.2 work)
  • Revision ID: gustav.hartvigsson@gmail.com-20210111201938-omr9wjz3qdgyxe8k
MergedĀ lp:brz

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
    self->flags |= STATIC_TUPLE_INTERNED_FLAG;
98
98
    // The two references in the dict do not count, so that the StaticTuple
99
99
    // object does not become immortal just because it was interned.
100
 
    Py_REFCNT(self) -= 1;
 
100
    Py_SET_REFCNT(self, Py_REFCNT(self) - 1);
101
101
    return self;
102
102
}
103
103
 
116
116
 
117
117
    if (_StaticTuple_is_interned(self)) {
118
118
        /* revive dead object temporarily for Discard */
119
 
        Py_REFCNT(self) = 2;
 
119
        Py_SET_REFCNT(self, 2);
120
120
        if (SimpleSet_Discard(_interned_tuples, (PyObject*)self) != 1)
121
121
            Py_FatalError("deletion of interned StaticTuple failed");
122
122
        self->flags &= ~STATIC_TUPLE_INTERNED_FLAG;