diff -r 7c71d2f97196 Modules/_bisectmodule.c --- a/Modules/_bisectmodule.c Thu Nov 07 12:37:56 2013 +0100 +++ b/Modules/_bisectmodule.c Thu Nov 07 16:47:58 2013 +0100 @@ -6,6 +6,8 @@ #define PY_SSIZE_T_CLEAN #include "Python.h" +_Py_IDENTIFIER(insert); + static Py_ssize_t internal_bisect_right(PyObject *list, PyObject *item, Py_ssize_t lo, Py_ssize_t hi) { @@ -90,8 +92,6 @@ if (PyList_Insert(list, index, item) < 0) return NULL; } else { - _Py_IDENTIFIER(insert); - result = _PyObject_CallMethodId(list, &PyId_insert, "nO", index, item); if (result == NULL) return NULL; @@ -195,7 +195,6 @@ if (PyList_Insert(list, index, item) < 0) return NULL; } else { - _Py_IDENTIFIER(insert); result = _PyObject_CallMethodId(list, &PyId_insert, "nO", index, item); if (result == NULL) return NULL; diff -r 7c71d2f97196 Modules/_datetimemodule.c --- a/Modules/_datetimemodule.c Thu Nov 07 12:37:56 2013 +0100 +++ b/Modules/_datetimemodule.c Thu Nov 07 16:47:58 2013 +0100 @@ -115,6 +115,12 @@ #define SIGNED_ADD_OVERFLOWED(RESULT, I, J) \ ((((RESULT) ^ (I)) & ((RESULT) ^ (J))) < 0) + +_Py_IDENTIFIER(as_integer_ratio); +_Py_IDENTIFIER(fromtimestamp); +_Py_IDENTIFIER(isoformat); +_Py_IDENTIFIER(strftime); + /* Compute Python divmod(x, y), returning the quotient and storing the * remainder into *r. The quotient is the floor of x/y, and that's * the real point of this. C will probably truncate instead (C99 @@ -1277,8 +1283,6 @@ goto Done; format = PyUnicode_FromString(PyBytes_AS_STRING(newfmt)); if (format != NULL) { - _Py_IDENTIFIER(strftime); - result = _PyObject_CallMethodId(time, &PyId_strftime, "OO", format, timetuple, NULL); Py_DECREF(format); @@ -1566,7 +1570,6 @@ PyObject *result = NULL; PyObject *pyus_in = NULL, *temp, *pyus_out; PyObject *ratio = NULL; - _Py_IDENTIFIER(as_integer_ratio); pyus_in = delta_to_microseconds(delta); if (pyus_in == NULL) @@ -1665,7 +1668,6 @@ PyObject *result = NULL; PyObject *pyus_in = NULL, *temp, *pyus_out; PyObject *ratio = NULL; - _Py_IDENTIFIER(as_integer_ratio); pyus_in = delta_to_microseconds(delta); if (pyus_in == NULL) @@ -2482,7 +2484,6 @@ { PyObject *time; PyObject *result; - _Py_IDENTIFIER(fromtimestamp); time = time_time(); if (time == NULL) @@ -2635,8 +2636,6 @@ static PyObject * date_str(PyDateTime_Date *self) { - _Py_IDENTIFIER(isoformat); - return _PyObject_CallMethodId((PyObject *)self, &PyId_isoformat, "()"); } @@ -2676,7 +2675,6 @@ date_format(PyDateTime_Date *self, PyObject *args) { PyObject *format; - _Py_IDENTIFIER(strftime); if (!PyArg_ParseTuple(args, "U:__format__", &format)) return NULL; @@ -3593,8 +3591,6 @@ static PyObject * time_str(PyDateTime_Time *self) { - _Py_IDENTIFIER(isoformat); - return _PyObject_CallMethodId((PyObject *)self, &PyId_isoformat, "()"); } @@ -4529,8 +4525,6 @@ static PyObject * datetime_str(PyDateTime_DateTime *self) { - _Py_IDENTIFIER(isoformat); - return _PyObject_CallMethodId((PyObject *)self, &PyId_isoformat, "(s)", " "); } diff -r 7c71d2f97196 Modules/_sqlite/connection.c --- a/Modules/_sqlite/connection.c Thu Nov 07 12:37:56 2013 +0100 +++ b/Modules/_sqlite/connection.c Thu Nov 07 16:47:58 2013 +0100 @@ -41,6 +41,8 @@ #endif #endif +_Py_IDENTIFIER(cursor); + static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level); static void _pysqlite_drop_unused_cursor_references(pysqlite_Connection* self); @@ -1279,7 +1281,6 @@ PyObject* cursor = 0; PyObject* result = 0; PyObject* method = 0; - _Py_IDENTIFIER(cursor); cursor = _PyObject_CallMethodId((PyObject*)self, &PyId_cursor, ""); if (!cursor) { @@ -1309,7 +1310,6 @@ PyObject* cursor = 0; PyObject* result = 0; PyObject* method = 0; - _Py_IDENTIFIER(cursor); cursor = _PyObject_CallMethodId((PyObject*)self, &PyId_cursor, ""); if (!cursor) { @@ -1339,7 +1339,6 @@ PyObject* cursor = 0; PyObject* result = 0; PyObject* method = 0; - _Py_IDENTIFIER(cursor); cursor = _PyObject_CallMethodId((PyObject*)self, &PyId_cursor, ""); if (!cursor) { diff -r 7c71d2f97196 Objects/typeobject.c --- a/Objects/typeobject.c Thu Nov 07 12:37:56 2013 +0100 +++ b/Objects/typeobject.c Thu Nov 07 16:47:58 2013 +0100 @@ -49,6 +49,8 @@ _Py_IDENTIFIER(__name__); _Py_IDENTIFIER(__new__); _Py_IDENTIFIER(__abstractmethods__); +_Py_IDENTIFIER(__len__); +_Py_IDENTIFIER(__delitem__); static PyObject * slot_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds); @@ -5068,7 +5070,6 @@ static Py_ssize_t slot_sq_length(PyObject *self) { - _Py_IDENTIFIER(__len__); PyObject *res = call_method(self, &PyId___len__, "()"); Py_ssize_t len; @@ -5129,7 +5130,6 @@ slot_sq_ass_item(PyObject *self, Py_ssize_t index, PyObject *value) { PyObject *res; - _Py_IDENTIFIER(__delitem__); _Py_IDENTIFIER(__setitem__); if (value == NULL) @@ -5180,7 +5180,6 @@ slot_mp_ass_subscript(PyObject *self, PyObject *key, PyObject *value) { PyObject *res; - _Py_IDENTIFIER(__delitem__); _Py_IDENTIFIER(__setitem__); if (value == NULL) @@ -5232,7 +5231,6 @@ PyObject *func, *args; int result = -1; int using_len = 0; - _Py_IDENTIFIER(__len__); _Py_IDENTIFIER(__bool__); func = lookup_maybe(self, &PyId___bool__);