mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Call me anal, but there was a particular phrase that was speading to
comments everywhere that bugged me: /* Foo is inlined */ instead of /* Inline Foo */. Somehow the "is inlined" phrase always confused me for half a second (thinking, "No it isn't" until I added the missing "here"). The new phrase is hopefully unambiguous.
This commit is contained in:
parent
056fbf422d
commit
e3a8e7ed1d
7 changed files with 9 additions and 9 deletions
|
@ -138,7 +138,7 @@ PyBuffer_New(int size)
|
||||||
"size must be zero or positive");
|
"size must be zero or positive");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* PyObject_New is inlined */
|
/* Inline PyObject_New */
|
||||||
o = PyObject_MALLOC(sizeof(*b) + size);
|
o = PyObject_MALLOC(sizeof(*b) + size);
|
||||||
if ( o == NULL )
|
if ( o == NULL )
|
||||||
return PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
|
|
|
@ -199,7 +199,7 @@ PyComplex_FromCComplex(Py_complex cval)
|
||||||
{
|
{
|
||||||
register PyComplexObject *op;
|
register PyComplexObject *op;
|
||||||
|
|
||||||
/* PyObject_New is inlined */
|
/* Inline PyObject_New */
|
||||||
op = (PyComplexObject *) PyObject_MALLOC(sizeof(PyComplexObject));
|
op = (PyComplexObject *) PyObject_MALLOC(sizeof(PyComplexObject));
|
||||||
if (op == NULL)
|
if (op == NULL)
|
||||||
return PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
|
|
|
@ -64,7 +64,7 @@ PyFloat_FromDouble(double fval)
|
||||||
if ((free_list = fill_free_list()) == NULL)
|
if ((free_list = fill_free_list()) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* PyObject_New is inlined */
|
/* Inline PyObject_New */
|
||||||
op = free_list;
|
op = free_list;
|
||||||
free_list = (PyFloatObject *)op->ob_type;
|
free_list = (PyFloatObject *)op->ob_type;
|
||||||
PyObject_INIT(op, &PyFloat_Type);
|
PyObject_INIT(op, &PyFloat_Type);
|
||||||
|
|
|
@ -113,7 +113,7 @@ PyInt_FromLong(long ival)
|
||||||
if ((free_list = fill_free_list()) == NULL)
|
if ((free_list = fill_free_list()) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* PyObject_New is inlined */
|
/* Inline PyObject_New */
|
||||||
v = free_list;
|
v = free_list;
|
||||||
free_list = (PyIntObject *)v->ob_type;
|
free_list = (PyIntObject *)v->ob_type;
|
||||||
PyObject_INIT(v, &PyInt_Type);
|
PyObject_INIT(v, &PyInt_Type);
|
||||||
|
|
|
@ -62,7 +62,7 @@ PyString_FromStringAndSize(const char *str, int size)
|
||||||
return (PyObject *)op;
|
return (PyObject *)op;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PyObject_NewVar is inlined */
|
/* Inline PyObject_NewVar */
|
||||||
op = (PyStringObject *)
|
op = (PyStringObject *)
|
||||||
PyObject_MALLOC(sizeof(PyStringObject) + size * sizeof(char));
|
PyObject_MALLOC(sizeof(PyStringObject) + size * sizeof(char));
|
||||||
if (op == NULL)
|
if (op == NULL)
|
||||||
|
@ -118,7 +118,7 @@ PyString_FromString(const char *str)
|
||||||
return (PyObject *)op;
|
return (PyObject *)op;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PyObject_NewVar is inlined */
|
/* Inline PyObject_NewVar */
|
||||||
op = (PyStringObject *)
|
op = (PyStringObject *)
|
||||||
PyObject_MALLOC(sizeof(PyStringObject) + size * sizeof(char));
|
PyObject_MALLOC(sizeof(PyStringObject) + size * sizeof(char));
|
||||||
if (op == NULL)
|
if (op == NULL)
|
||||||
|
@ -878,7 +878,7 @@ string_concat(register PyStringObject *a, register PyObject *bb)
|
||||||
return (PyObject *)a;
|
return (PyObject *)a;
|
||||||
}
|
}
|
||||||
size = a->ob_size + b->ob_size;
|
size = a->ob_size + b->ob_size;
|
||||||
/* PyObject_NewVar is inlined */
|
/* Inline PyObject_NewVar */
|
||||||
op = (PyStringObject *)
|
op = (PyStringObject *)
|
||||||
PyObject_MALLOC(sizeof(PyStringObject) + size * sizeof(char));
|
PyObject_MALLOC(sizeof(PyStringObject) + size * sizeof(char));
|
||||||
if (op == NULL)
|
if (op == NULL)
|
||||||
|
|
|
@ -48,7 +48,7 @@ PyTuple_New(register int size)
|
||||||
#ifdef COUNT_ALLOCS
|
#ifdef COUNT_ALLOCS
|
||||||
fast_tuple_allocs++;
|
fast_tuple_allocs++;
|
||||||
#endif
|
#endif
|
||||||
/* PyObject_InitVar is inlined */
|
/* Inline PyObject_InitVar */
|
||||||
#ifdef Py_TRACE_REFS
|
#ifdef Py_TRACE_REFS
|
||||||
op->ob_size = size;
|
op->ob_size = size;
|
||||||
op->ob_type = &PyTuple_Type;
|
op->ob_type = &PyTuple_Type;
|
||||||
|
|
|
@ -606,7 +606,7 @@ PyHKEY_FromHKEY(HKEY h)
|
||||||
{
|
{
|
||||||
PyHKEYObject *op;
|
PyHKEYObject *op;
|
||||||
|
|
||||||
/* PyObject_New is inlined */
|
/* Inline PyObject_New */
|
||||||
op = (PyHKEYObject *) PyObject_MALLOC(sizeof(PyHKEYObject));
|
op = (PyHKEYObject *) PyObject_MALLOC(sizeof(PyHKEYObject));
|
||||||
if (op == NULL)
|
if (op == NULL)
|
||||||
return PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue