summaryrefslogtreecommitdiff
path: root/Source/Modules/python.cxx
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-10-07 18:41:14 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-10-07 18:41:14 +0100
commit4a397869a2e2be3c196fac3b404aabe0cc19f494 (patch)
tree159a1e08de816d9aac741d2435038624f47e9c1e /Source/Modules/python.cxx
parente1fdb67f094d3cb616a2b1b999b95f969f6096cb (diff)
parentdeb7cbf7416a5d1503f490b087f4da0b2693709c (diff)
downloadswig-4a397869a2e2be3c196fac3b404aabe0cc19f494.tar.gz
Merge branch 'director-unwrap-result'
* director-unwrap-result: Unwrap director classes only when returning a pointer or reference to an object
Diffstat (limited to 'Source/Modules/python.cxx')
-rw-r--r--Source/Modules/python.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
index d498a3456..6a1c0a0a2 100644
--- a/Source/Modules/python.cxx
+++ b/Source/Modules/python.cxx
@@ -3159,9 +3159,7 @@ public:
#if 1
int unwrap = 0;
String *decl = Getattr(n, "decl");
- int is_pointer = SwigType_ispointer_return(decl);
- int is_reference = SwigType_isreference_return(decl);
- if (is_pointer || is_reference) {
+ if (SwigType_refptr_count_return(decl) == 1) {
String *type = Getattr(n, "type");
//Node *classNode = Swig_methodclass(n);
//Node *module = Getattr(classNode, "module");