Mercurial > cpython-lru_cache-weakref
view Objects/stringlib/eq.h @ 66978:aed2bbafa550 3.1
Blocked revisions 87324 via svnmerge
........
r87324 | r.david.murray | 2010-12-16 14:08:51 -0500 (Thu, 16 Dec 2010) | 9 lines
#10719: restore messages generated on invalid compileall args
Before the introduction of filename arguments to compileall it gave semi useful
messages about not being able to 'list' names that weren't valid directories.
This fix restores that behavior. In addition to the test for this case, the
patch also adds a test for the default behavior of compileall when no arguments
are provided, and fixes a bug in one of the previously added tests.
........
| author | R. David Murray <rdmurray@bitdance.com> |
|---|---|
| date | Thu, 16 Dec 2010 19:10:16 +0000 |
| parents | f197407bdba2 |
| children | 8beaa9a37387 |
line wrap: on
line source
/* Fast unicode equal function optimized for dictobject.c and setobject.c */ /* Return 1 if two unicode objects are equal, 0 if not. * unicode_eq() is called when the hash of two unicode objects is equal. */ Py_LOCAL_INLINE(int) unicode_eq(PyObject *aa, PyObject *bb) { register PyUnicodeObject *a = (PyUnicodeObject *)aa; register PyUnicodeObject *b = (PyUnicodeObject *)bb; if (a->length != b->length) return 0; if (a->length == 0) return 1; if (a->str[0] != b->str[0]) return 0; if (a->length == 1) return 1; return memcmp(a->str, b->str, a->length * sizeof(Py_UNICODE)) == 0; }
