151a152 > Py_DECREF(p); 520,523d520 < /* Release the thread state because we will never use < * the main interpreter, only sub interpreters created later. */ < PyThreadState_Swap(NULL); < 531a529,547 > { > /* > Workaround for "PEP 311 - Simplified Global Interpreter > Lock Acquisition for Extensions" > */ > PyObject *p = 0; > interpreterdata * idata = (interpreterdata *)malloc(sizeof(interpreterdata)); > PyThreadState* currentThreadState = PyThreadState_Get(); > PyInterpreterState *istate = currentThreadState->interp; > idata->istate = istate; > /* obcallback will be created on first use */ > idata->obcallback = NULL; > p = PyCObject_FromVoidPtr((void *) idata, NULL); > PyDict_SetItemString(interpreters, MAIN_INTERPRETER, p); > Py_DECREF(p); > } > > PyThreadState_Swap(NULL); > 601,603d616 < /* < code begin < */ 697,701d709 < < /* < code end < */ <