Skip to content

Commit ddd329f

Browse files
committed
address review: rename function to _PyLong_InitTag
1 parent 095a186 commit ddd329f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Include/internal/pycore_long.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ _PyLong_SameSign(const PyLongObject *a, const PyLongObject *b)
293293
* use-of-uninitialized-value.
294294
*/
295295
static inline void
296-
_PyLong_Init(PyLongObject *op)
296+
_PyLong_InitTag(PyLongObject *op)
297297
{
298298
assert(PyLong_Check(op));
299299
op->long_value.lv_tag = 1; /* non-immortal zero */

Objects/longobject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ long_alloc(Py_ssize_t size)
185185
return NULL;
186186
}
187187
_PyObject_Init((PyObject*)result, &PyLong_Type);
188-
_PyLong_Init(result);
188+
_PyLong_InitTag(result);
189189
}
190190
_PyLong_SetSignAndDigitCount(result, size != 0, size);
191191
return result;
@@ -256,7 +256,7 @@ _PyLong_FromMedium(sdigit x)
256256
return NULL;
257257
}
258258
_PyObject_Init((PyObject*)v, &PyLong_Type);
259-
_PyLong_Init(v);
259+
_PyLong_InitTag(v);
260260
}
261261
digit abs_x = x < 0 ? -x : x;
262262
_PyLong_SetSignAndDigitCount(v, x<0?-1:1, 1);
@@ -336,7 +336,7 @@ medium_from_stwodigits(stwodigits x)
336336
return PyStackRef_NULL;
337337
}
338338
_PyObject_Init((PyObject*)v, &PyLong_Type);
339-
_PyLong_Init(v);
339+
_PyLong_InitTag(v);
340340
}
341341
digit abs_x = x < 0 ? (digit)(-x) : (digit)x;
342342
_PyLong_SetSignAndDigitCount(v, x<0?-1:1, 1);
@@ -6035,7 +6035,7 @@ long_subtype_new(PyTypeObject *type, PyObject *x, PyObject *obase)
60356035
else {
60366036
sign = _PyLong_NonCompactSign(tmp);
60376037
}
6038-
_PyLong_Init(newobj);
6038+
_PyLong_InitTag(newobj);
60396039
_PyLong_SetSignAndDigitCount(newobj, sign, size);
60406040
memcpy(newobj->long_value.ob_digit, tmp->long_value.ob_digit,
60416041
ndigits * sizeof(digit));

0 commit comments

Comments
 (0)