aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc/tutorials/basictutorial
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-02-12 19:13:43 +0100
committerChristian Tismer <tismer@stackless.com>2021-02-22 13:13:37 +0100
commit45f37d5e16fff807d612f8eedb5496f4579481cc (patch)
tree5a90431d3bff9ad99709cf8e2813b8b203b5b1b4 /sources/pyside6/doc/tutorials/basictutorial
parent846f8a6b8606c6ae1cead76b8ba5e47e0bea5355 (diff)
cppgenerator: simplify code further using AutoDecref
Shiboken::AutoDecref is an increadible handy tool to simplify reference counted code. One missing spot was to be able to declare an AutoDecref variable without specifying a value for later use by reset(). A workaround was this code: static PyObject *_dummy{}; Shiboken::AutoDecref errCode(_dummy); ... errCode.reset(someVar); We now allow AutoDecref without an expression and can write Shiboken::AutoDecref errCode{}; ... errCode.reset(someVar); That construct is used to further simplify the generated code quite much. Change-Id: I2ae8f2214c0fbaae0a935aa0b8d69b4a7922a6c8 Task-number: PYSIDE-1499 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/doc/tutorials/basictutorial')
0 files changed, 0 insertions, 0 deletions