aboutsummaryrefslogtreecommitdiff
path: root/Lib/python
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-02-15 21:58:38 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-02-15 22:01:38 +0000
commit62417708fdb63c7eff0f2921adae898475d2f980 (patch)
treea1d30af94ef3387badfb6c07c7473511aa799bfc /Lib/python
parent30f16b913843fa7696544f1e61c3d4a00fb11bc2 (diff)
downloadswig-62417708fdb63c7eff0f2921adae898475d2f980.tar.gz
Better name for container back-reference attribute
Mangle name with swig so as not to clash with any attribute names a user might use. Remove Doxygen style comments - we don't use Doxygen in SWIG.
Diffstat (limited to 'Lib/python')
-rw-r--r--Lib/python/pycontainer.swg13
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/python/pycontainer.swg b/Lib/python/pycontainer.swg
index ec31bad0d..a2ee9522c 100644
--- a/Lib/python/pycontainer.swg
+++ b/Lib/python/pycontainer.swg
@@ -44,7 +44,7 @@
%fragment("reference_container_owner", "header", fragment="container_owner_attribute_init") {
namespace swig {
PyObject* container_owner_attribute() {
- static PyObject* attr = SWIG_Python_str_FromChar("__owner");
+ static PyObject* attr = SWIG_Python_str_FromChar("__swig_container");
return attr;
}
@@ -52,18 +52,19 @@ namespace swig {
struct container_owner {
// By default, do not add the back-reference (for value types)
// Specialization below will check the reference for pointer types.
- static bool reference(PyObject* child, PyObject* owner)
- { return false; }
+ static bool reference(PyObject* child, PyObject* owner) {
+ return false;
+ }
};
template <>
struct container_owner<swig::pointer_category> {
- /**
+ /*
* Call to add a back-reference to the owning object when returning a
- * reference from a container. Will only set the reference if <code>child</code>
+ * reference from a container. Will only set the reference if child
* is a SWIG wrapper object that does not own the pointer.
*
- * @return if the reference was set or not
+ * returns whether the reference was set or not
*/
static bool reference(PyObject* child, PyObject* owner) {
SwigPyObject* swigThis = SWIG_Python_GetSwigThis(child);