From 21d716d72b85833812e5302412f8b4e1ab6f0148 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Thu, 30 Dec 2021 01:07:47 -0800 Subject: [PATCH] A bit more terminology updating. --- python/map.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/map.c b/python/map.c index 8e5ac24b29..b374f7f9cf 100644 --- a/python/map.c +++ b/python/map.c @@ -52,12 +52,12 @@ typedef struct { static PyObject* PyUpb_MapIterator_New(PyUpb_MapContainer* map); -static bool PyUpb_MapContainer_IsUnset(PyUpb_MapContainer* self) { +static bool PyUpb_MapContainer_IsStub(PyUpb_MapContainer* self) { return self->field & 1; } static upb_map* PyUpb_MapContainer_GetIfWritable(PyUpb_MapContainer* self) { - return PyUpb_MapContainer_IsUnset(self) ? NULL : self->ptr.map; + return PyUpb_MapContainer_IsStub(self) ? NULL : self->ptr.map; } static const upb_fielddef* PyUpb_MapContainer_GetField( @@ -68,7 +68,7 @@ static const upb_fielddef* PyUpb_MapContainer_GetField( static void PyUpb_MapContainer_Dealloc(void* _self) { PyUpb_MapContainer* self = _self; Py_DECREF(self->arena); - if (PyUpb_MapContainer_IsUnset(self)) { + if (PyUpb_MapContainer_IsStub(self)) { PyUpb_CMessage_CacheDelete(self->ptr.parent, PyUpb_MapContainer_GetField(self)); Py_DECREF(self->ptr.parent); @@ -104,7 +104,7 @@ void PyUpb_MapContainer_Reify(PyObject* _self, upb_map* map) { Py_DECREF(self->ptr.parent); self->ptr.map = map; // Overwrites self->ptr.parent. self->field = self->field & ~(uintptr_t)1; - assert(!PyUpb_MapContainer_IsUnset(self)); + assert(!PyUpb_MapContainer_IsStub(self)); } void PyUpb_MapContainer_Invalidate(PyObject* obj) {