2 // { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
4 typedef struct _ts { } PyThreadState;
5 PyThreadState * Py_NewInterpreter(void);
6 void Py_EndInterpreter(PyThreadState *);
7 class ApplicationError {
9 ApplicationError(std::string errormsg) : errormsg(errormsg) { }
14 PyThreadState *py_state=__null;
16 if (!(py_state=Py_NewInterpreter()))
17 throw ApplicationError("error");
19 catch(ApplicationError e) {
20 Py_EndInterpreter(py_state);