Skip to content

Commit

Permalink
added warning about wrapping wrapped functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenzel Jakob committed Nov 17, 2015
1 parent eb7c0b8 commit a4175d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
======================================

Expand Down

0 comments on commit a4175d6

Please sign in to comment.