mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 00:22:00 +00:00
added warning about wrapping wrapped functions
This commit is contained in:
parent
eb7c0b82ec
commit
a4175d6ea3
@ -160,6 +160,14 @@ The following interactive session shows how to call them from Python.
|
|||||||
The file :file:`example/example5.cpp` contains a complete example that
|
The file :file:`example/example5.cpp` contains a complete example that
|
||||||
demonstrates how to work with callbacks and anonymous functions in more detail.
|
demonstrates how to work with callbacks and anonymous functions in more detail.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
Keep in mind that passing a function from C++ to Python (or vice versa)
|
||||||
|
will instantiate a piece of wrapper code that translates function
|
||||||
|
invocations between the two languages. Copying the same function back and
|
||||||
|
forth between Python and C++ many times in a row will cause these wrappers
|
||||||
|
to accumulate, which can decrease performance.
|
||||||
|
|
||||||
Overriding virtual functions in Python
|
Overriding virtual functions in Python
|
||||||
======================================
|
======================================
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user