@@ -341,10 +341,12 @@ NB_CORE const std::type_info *nb_type_info(PyObject *t) noexcept;
341341NB_CORE void *nb_inst_ptr (PyObject *o) noexcept ;
342342
343343// / Check if a Python type object wraps an instance of a specific C++ type
344- NB_CORE bool nb_type_isinstance (PyObject *obj, const std::type_info *t) noexcept ;
344+ NB_CORE bool nb_type_isinstance (PyObject *obj, const std::type_info *t,
345+ bool foreign_ok) noexcept ;
345346
346- // / Search for the Python type object associated with a C++ type
347- NB_CORE PyObject *nb_type_lookup (const std::type_info *t) noexcept ;
347+ // / Search for a Python type object associated with a C++ type
348+ NB_CORE PyObject *nb_type_lookup (const std::type_info *t,
349+ bool foreign_ok) noexcept ;
348350
349351// / Allocate an instance of type 't'
350352NB_CORE PyObject *nb_inst_alloc (PyTypeObject *t);
@@ -386,6 +388,15 @@ NB_CORE void nb_inst_set_state(PyObject *o, bool ready, bool destruct) noexcept;
386388// / Query the 'ready' and 'destruct' flags of an instance
387389NB_CORE std::pair<bool , bool > nb_inst_state (PyObject *o) noexcept ;
388390
391+ // Set whether types will be shared with other binding frameworks by default
392+ NB_CORE void nb_type_set_foreign_defaults (bool export_all, bool import_all);
393+
394+ // Teach nanobind about a type bound by another binding framework
395+ NB_CORE void nb_type_import (PyObject *pytype, const std::type_info *cpptype);
396+
397+ // Teach other binding frameworks about a type bound by nanobind
398+ NB_CORE void nb_type_export (PyObject *pytype);
399+
389400// ========================================================================
390401
391402// Create and install a Python property object
@@ -500,7 +511,8 @@ NB_CORE void print(PyObject *file, PyObject *str, PyObject *end);
500511typedef void (*exception_translator)(const std::exception_ptr &, void *);
501512
502513NB_CORE void register_exception_translator (exception_translator translator,
503- void *payload);
514+ void *payload,
515+ bool at_end);
504516
505517NB_CORE PyObject *exception_new (PyObject *mod, const char *name,
506518 PyObject *base);
0 commit comments