Lines Matching defs:interp
66 PyObject *sd = tstate->interp->sysdict;
80 _PySys_GetObject(PyInterpreterState *interp, const char *name)
82 PyObject *sysdict = interp->sysdict;
96 PyObject *value = _PySys_GetObject(tstate->interp, name);
104 sys_set_object(PyInterpreterState *interp, PyObject *key, PyObject *v)
109 PyObject *sd = interp->sysdict;
126 PyInterpreterState *interp = _PyInterpreterState_GET();
127 return sys_set_object(interp, key, v);
131 sys_set_object_str(PyInterpreterState *interp, const char *name, PyObject *v)
135 int r = sys_set_object(interp, key, v);
143 PyInterpreterState *interp = _PyInterpreterState_GET();
144 return sys_set_object_str(interp, name, v);
149 should_audit(PyInterpreterState *interp)
151 /* interp must not be NULL, but test it just in case for extra safety */
152 assert(interp != NULL);
153 if (!interp) {
156 return (interp->runtime->audit_hook_head
157 || interp->audit_hooks
181 PyInterpreterState *is = ts->interp;
334 _PyRuntimeState *runtime = ts->interp->runtime;
341 const PyConfig *config = _PyInterpreterState_GetConfig(ts->interp);
437 PyInterpreterState *interp = tstate->interp;
438 if (interp->audit_hooks == NULL) {
439 interp->audit_hooks = PyList_New(0);
440 if (interp->audit_hooks == NULL) {
444 PyObject_GC_UnTrack(interp->audit_hooks);
447 if (PyList_Append(interp->audit_hooks, hook) < 0) {
472 if (!should_audit(tstate->interp)) {
866 PyInterpreterState *interp = _PyInterpreterState_GET();
867 const PyConfig *config = _PyInterpreterState_GetConfig(interp);
881 PyInterpreterState *interp = _PyInterpreterState_GET();
882 const PyConfig *config = _PyInterpreterState_GetConfig(interp);
1577 PyInterpreterState *interp = _PyInterpreterState_GET();
1578 interp->dlopenflags = new_val;
1595 PyInterpreterState *interp = _PyInterpreterState_GET();
1596 return PyLong_FromLong(interp->dlopenflags);
1633 PyInterpreterState *interp = _PyInterpreterState_GET();
1634 return PyLong_FromSsize_t(interp->int_max_str_digits);
1651 tstate->interp->int_max_str_digits = maxdigits;
2244 if (sys_set_object(tstate->interp, &_Py_ID(warnoptions), warnoptions)) {
2340 if (sys_set_object(tstate->interp, &_Py_ID(_xoptions), xoptions)) {
2545 set_flags_from_config(PyInterpreterState *interp, PyObject *flags)
2547 const PyPreConfig *preconfig = &interp->runtime->preconfig;
2548 const PyConfig *config = _PyInterpreterState_GetConfig(interp);
2590 make_flags(PyInterpreterState *interp)
2597 if (set_flags_from_config(interp, flags) < 0) {
2955 SET_SYS("flags", make_flags(tstate->interp));
3073 PyInterpreterState *interp = tstate->interp;
3074 PyObject *sysdict = interp->sysdict;
3075 const PyConfig *config = _PyInterpreterState_GetConfig(interp);
3126 PyObject *flags = _PySys_GetObject(interp, "flags"); // borrowed ref
3130 if (set_flags_from_config(interp, flags) < 0) {
3183 PyInterpreterState *interp = tstate->interp;
3189 interp->modules = modules;
3201 interp->sysdict = sysdict;
3203 if (PyDict_SetItemString(sysdict, "modules", interp->modules) < 0) {
3217 if (_PyImport_FixupBuiltin(sysmod, "sys", interp->modules) < 0) {
3232 _PySys_Fini(PyInterpreterState *interp)
3234 if (_Py_IsMainInterpreter(interp)) {
3288 PyInterpreterState *interp = _PyInterpreterState_GET();
3289 if (sys_set_object(interp, &_Py_ID(path), v) != 0) {
3330 if (sys_set_object_str(tstate->interp, "argv", av) != 0) {