Lines Matching defs:package
1541 PyObject *package = NULL;
1555 package = PyDict_GetItemWithError(globals, &_Py_ID(__package__));
1556 if (package == Py_None) {
1557 package = NULL;
1559 else if (package == NULL && _PyErr_Occurred(tstate)) {
1567 if (package != NULL) {
1568 Py_INCREF(package);
1569 if (!PyUnicode_Check(package)) {
1571 "package must be a string");
1581 equal = PyObject_RichCompareBool(package, parent, Py_EQ);
1595 package = PyObject_GetAttr(spec, &_Py_ID(parent));
1596 if (package == NULL) {
1599 else if (!PyUnicode_Check(package)) {
1607 "can't resolve package from __spec__ or __package__, "
1612 package = PyDict_GetItemWithError(globals, &_Py_ID(__name__));
1613 if (package == NULL) {
1621 Py_INCREF(package);
1622 if (!PyUnicode_Check(package)) {
1635 if (PyUnicode_READY(package) < 0) {
1639 dot = PyUnicode_FindChar(package, '.',
1640 0, PyUnicode_GET_LENGTH(package), -1);
1647 PyObject *substr = PyUnicode_Substring(package, 0, dot);
1651 Py_SETREF(package, substr);
1655 last_dot = PyUnicode_GET_LENGTH(package);
1661 last_dot = PyUnicode_FindChar(package, '.', 0, last_dot, -1);
1668 "package");
1673 base = PyUnicode_Substring(package, 0, last_dot);
1674 Py_DECREF(package);
1686 "with no known parent package");
1689 Py_XDECREF(package);
1723 fputs("import time: self [us] | cumulative | imported package\n",
1784 PyObject *package = NULL;
1919 Py_XDECREF(package);
2119 * is_package whether or not it is a package
2225 Returns True if the module name is of a frozen package.