From 45e6e6f6eb8754f86ebe6886d39fc97addd13b5f Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Fri, 4 Nov 2016 11:06:22 +0100 Subject: [PATCH] add note about custom type casters (fixes #480) --- docs/advanced/cast/custom.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/advanced/cast/custom.rst b/docs/advanced/cast/custom.rst index 50b07db51..c854e7fcd 100644 --- a/docs/advanced/cast/custom.rst +++ b/docs/advanced/cast/custom.rst @@ -77,3 +77,9 @@ type is explicitly allowed. } }; }} // namespace pybind11::detail + +.. warning:: + + When using custom type casters, it's important to declare them consistently + in every compilation unit of the Python extension module. Otherwise, + undefined behavior can ensue.