Lines Matching defs:ident
454 _Py_Mangle(PyObject *privateobj, PyObject *ident)
462 PyUnicode_READ_CHAR(ident, 0) != '_' ||
463 PyUnicode_READ_CHAR(ident, 1) != '_') {
464 Py_INCREF(ident);
465 return ident;
467 nlen = PyUnicode_GET_LENGTH(ident);
478 if ((PyUnicode_READ_CHAR(ident, nlen-1) == '_' &&
479 PyUnicode_READ_CHAR(ident, nlen-2) == '_') ||
480 PyUnicode_FindChar(ident, '.', 0, nlen, 1) != -1) {
481 Py_INCREF(ident);
482 return ident; /* Don't mangle __whatever__ */
489 Py_INCREF(ident);
490 return ident; /* Don't mangle if class is just underscores */
500 maxchar = PyUnicode_MAX_CHAR_VALUE(ident);
507 /* ident = "_" + priv[ipriv:] + ident # i.e. 1+plen+nlen bytes */
513 if (PyUnicode_CopyCharacters(result, plen+1, ident, 0, nlen) < 0) {