Lines Matching refs:registry
67 PyObject *registry; in get_once_registry() local
69 registry = get_warnings_attr("onceregistry"); in get_once_registry()
70 if (registry == NULL) { in get_once_registry()
75 if (!PyDict_Check(registry)) { in get_once_registry()
78 Py_DECREF(registry); in get_once_registry()
82 _once_registry = registry; in get_once_registry()
83 return registry; in get_once_registry()
175 already_warned(PyObject *registry, PyObject *key, int should_set) in already_warned() argument
182 already_warned = PyDict_GetItem(registry, key); in already_warned()
191 return PyDict_SetItem(registry, key, Py_True); in already_warned()
227 update_registry(PyObject *registry, PyObject *text, PyObject *category, in update_registry() argument
242 rc = already_warned(registry, altkey, 1); in update_registry()
297 PyObject *module, PyObject *registry, PyObject *sourceline) in warn_explicit() argument
304 if (registry && !PyDict_Check(registry) && (registry != Py_None)) { in warn_explicit()
346 if ((registry != NULL) && (registry != Py_None)) { in warn_explicit()
347 rc = already_warned(registry, key, 0); in warn_explicit()
368 if (registry != NULL && registry != Py_None && in warn_explicit()
369 PyDict_SetItem(registry, key, Py_True) < 0) in warn_explicit()
374 if (registry == NULL || registry == Py_None) { in warn_explicit()
375 registry = get_once_registry(); in warn_explicit()
376 if (registry == NULL) in warn_explicit()
380 rc = update_registry(registry, text, category, 0); in warn_explicit()
384 if (registry != NULL && registry != Py_None) in warn_explicit()
385 rc = update_registry(registry, text, category, 0); in warn_explicit()
450 PyObject **module, PyObject **registry) in setup_context() argument
473 *registry = PyDict_GetItemString(globals, "__warningregistry__"); in setup_context()
474 if (*registry == NULL) { in setup_context()
477 *registry = PyDict_New(); in setup_context()
478 if (*registry == NULL) in setup_context()
481 rc = PyDict_SetItemString(globals, "__warningregistry__", *registry); in setup_context()
486 Py_INCREF(*registry); in setup_context()
560 Py_XDECREF(*registry); in setup_context()
596 PyObject *filename, *module, *registry, *res; in do_warn() local
599 if (!setup_context(stack_level, &filename, &lineno, &module, ®istry)) in do_warn()
602 res = warn_explicit(category, message, filename, lineno, module, registry, in do_warn()
605 Py_DECREF(registry); in do_warn()
637 PyObject *registry = NULL; in warnings_warn_explicit() local
642 ®istry, &module_globals)) in warnings_warn_explicit()
703 registry, source_line); in warnings_warn_explicit()
710 registry, NULL); in warnings_warn_explicit()
750 const char *module_str, PyObject *registry) in PyErr_WarnExplicit() argument
768 res = warn_explicit(category, message, filename, lineno, module, registry, in PyErr_WarnExplicit()