File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -242,16 +242,6 @@ inline void translate_exception(std::exception_ptr p) {
242
242
}
243
243
}
244
244
245
- #if !defined(__GLIBCXX__)
246
- inline void translate_local_exception (std::exception_ptr p) {
247
- try {
248
- if (p) std::rethrow_exception (p);
249
- } catch (error_already_set &e) { e.restore (); return ;
250
- } catch (const builtin_exception &e) { e.set_error (); return ;
251
- }
252
- }
253
- #endif
254
-
255
245
// / Return a reference to the current `internals` data
256
246
PYBIND11_NOINLINE inline internals &get_internals () {
257
247
auto **&internals_pp = get_internals_pp ();
@@ -270,15 +260,6 @@ PYBIND11_NOINLINE inline internals &get_internals() {
270
260
auto builtins = handle (PyEval_GetBuiltins ());
271
261
if (builtins.contains (id) && isinstance<capsule>(builtins[id])) {
272
262
internals_pp = static_cast <internals **>(capsule (builtins[id]));
273
-
274
- // We loaded builtins through python's builtins, which means that our `error_already_set`
275
- // and `builtin_exception` may be different local classes than the ones set up in the
276
- // initial exception translator, below, so add another for our local exception classes.
277
- //
278
- // libstdc++ doesn't require this (types there are identified only by name)
279
- #if !defined(__GLIBCXX__)
280
- (*internals_pp)->registered_exception_translators .push_front (&translate_local_exception);
281
- #endif
282
263
} else {
283
264
if (!internals_pp) internals_pp = new internals*();
284
265
auto *&internals_ptr = *internals_pp;
You can’t perform that action at this time.
0 commit comments