Skip to content

Commit 5cb7eef

Browse files
committed
Add RichToolTip
1 parent a0d179f commit 5cb7eef

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

etg/_adv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
'laywin',
4646
#'odcombo',
4747
#'bmpcbox',
48-
#'richtooltip',
48+
'richtooltip',
4949
#'timectrl',
5050
#'treelist',
5151
#'wizard',
File renamed without changes.

etgtools/cffi/wrappedtype.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,21 @@ def virt_py_param_cleanup(self, typeinfo, name):
493493
.format(name, typeinfo, self.unscopedpyname))
494494

495495
def virt_py_return(self, typeinfo, name):
496+
if typeinfo.convert_pyobj_code is not None:
497+
convert = ("""\
498+
{0} = {1}._pyobject_mapping_.convert({0})\n"""
499+
.format(name, self.pyname))
500+
else:
501+
convert = ""
496502
# Replicate sip's (largely undocumented) handling of ownership of
497503
# objects returned by virtual methods annotated with factory or
498504
# transfer_back:
499-
return ("""\
505+
give_ownership = ("""\
500506
wrapper_lib.give_ownership({0}, None, {1})
501507
{0} = wrapper_lib.get_ptr({0}, {2})"""
502508
.format(name, typeinfo.flags.factory or typeinfo.flags.transfer_back,
503509
self.unscopedpyname))
510+
return convert + give_ownership
504511

505512
def virt_cpp_param_setup(self, typeinfo, name):
506513
if typeinfo.flags.array:

0 commit comments

Comments
 (0)