aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/codeinjectionsemantics.rst13
-rw-r--r--doc/typesystemvariables.rst9
2 files changed, 18 insertions, 4 deletions
diff --git a/doc/codeinjectionsemantics.rst b/doc/codeinjectionsemantics.rst
index c0d6fa2d7..aaa965fea 100644
--- a/doc/codeinjectionsemantics.rst
+++ b/doc/codeinjectionsemantics.rst
@@ -71,9 +71,9 @@ The following table describes the semantics of ``inject-code`` tag as used on
| | | |Python override, if there is any), right after the C++ |
| | | |arguments have been converted but before the Python call. |
| | +---------+--------------------------------------------------------------+
- | | |end |This code injection goes to the end of a virtual method |
- | | | |override on the C++ wrapper class, right before the return |
- | | | |statement (if any). |
+ | | |end |This code injection is put in a virtual method override on the|
+ | | | |C++ wrapper class, after the call to Python and before |
+ | | | |dereferencing the Python method and tuple of arguments. |
| +------+---------+--------------------------------------------------------------+
| |target|beginning|This code is injected on the Python method wrapper |
| | | |(``PyCLASS_METHOD(...)``), right after the decisor have found |
@@ -186,6 +186,9 @@ instead of
Code Injection for Functions/Methods
====================================
+
+.. _codeinjecting_method_native:
+
On The Native Side
------------------
@@ -197,7 +200,7 @@ class is polymorphic.
int InjectCodeWrapper::virtualMethod(int arg)
{
PyObject* method = BindingManager::instance().getOverride(this, "virtualMethod");
- if (!method)
+ if (!py_override)
return this->InjectCode::virtualMethod(arg);
(... here C++ arguments are converted to Python ...)
@@ -212,6 +215,8 @@ class is polymorphic.
// Uses: post method call custom code, modify the result before delivering
// it to C++ caller.
+ (... Python method and argument tuple are dereferenced here ...)
+
return Shiboken::Converter<int>::toCpp(method_result);
}
diff --git a/doc/typesystemvariables.rst b/doc/typesystemvariables.rst
index dbfc29350..9966cfc55 100644
--- a/doc/typesystemvariables.rst
+++ b/doc/typesystemvariables.rst
@@ -206,6 +206,15 @@ Variables
C++ parent's one.
+.. _python_method_override:
+
+**%PYTHON_METHOD_OVERRIDE**
+
+ This variable is used only on :ref:`native method code injections
+ <codeinjecting_method_native>`, i.e. on the binding overrides for C++ virtual
+ methods. It is replaced by a pointer to the Python method override.
+
+
.. _pythontypeobject:
**%PYTHONTYPEOBJECT**