mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
QgsSipUtils.isPyOwned will return True if an object is owned by python, or False if ownership is held by another object or c++ class. This gives a way to test in advance if we can safely assign an object to a method which takes ownership (which always results in a crash).
6 lines
191 B
Python
6 lines
191 B
Python
# The following has been generated automatically from src/core/qgssiputils.h
|
|
try:
|
|
QgsSipUtils.isPyOwned = staticmethod(QgsSipUtils.isPyOwned)
|
|
except (NameError, AttributeError):
|
|
pass
|