Lines Matching refs:interp
34 PyInterpreterState *interp = PyThreadState_GET()->interp; in PyCodec_Register() local
35 if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) in PyCodec_Register()
45 return PyList_Append(interp->codec_search_path, search_function); in PyCodec_Register()
103 PyInterpreterState *interp; in _PyCodec_Lookup() local
112 interp = PyThreadState_GET()->interp; in _PyCodec_Lookup()
113 if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) in _PyCodec_Lookup()
125 result = PyDict_GetItem(interp->codec_search_cache, v); in _PyCodec_Lookup()
138 len = PyList_Size(interp->codec_search_path); in _PyCodec_Lookup()
151 func = PyList_GetItem(interp->codec_search_path, i); in _PyCodec_Lookup()
177 if (PyDict_SetItem(interp->codec_search_cache, v, result) < 0) { in _PyCodec_Lookup()
191 PyInterpreterState *interp; in _PyCodec_Forget() local
195 interp = PyThreadState_GET()->interp; in _PyCodec_Forget()
196 if (interp->codec_search_path == NULL) { in _PyCodec_Forget()
209 result = PyDict_DelItem(interp->codec_search_cache, v); in _PyCodec_Forget()
632 PyInterpreterState *interp = PyThreadState_GET()->interp; in PyCodec_RegisterError() local
633 if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) in PyCodec_RegisterError()
639 return PyDict_SetItemString(interp->codec_error_registry, in PyCodec_RegisterError()
650 PyInterpreterState *interp = PyThreadState_GET()->interp; in PyCodec_LookupError() local
651 if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) in PyCodec_LookupError()
656 handler = PyDict_GetItemString(interp->codec_error_registry, name); in PyCodec_LookupError()
1511 PyInterpreterState *interp = PyThreadState_GET()->interp; in _PyCodecRegistry_Init() local
1515 if (interp->codec_search_path != NULL) in _PyCodecRegistry_Init()
1518 interp->codec_search_path = PyList_New(0); in _PyCodecRegistry_Init()
1519 interp->codec_search_cache = PyDict_New(); in _PyCodecRegistry_Init()
1520 interp->codec_error_registry = PyDict_New(); in _PyCodecRegistry_Init()
1522 if (interp->codec_error_registry) { in _PyCodecRegistry_Init()
1535 if (interp->codec_search_path == NULL || in _PyCodecRegistry_Init()
1536 interp->codec_search_cache == NULL || in _PyCodecRegistry_Init()
1537 interp->codec_error_registry == NULL) in _PyCodecRegistry_Init()
1545 interp->codecs_initialized = 1; in _PyCodecRegistry_Init()