diff options
| author | aneejit1 <aneejit1@gmail.com> | 2022-04-28 21:10:55 +0000 |
|---|---|---|
| committer | Slávek Banko <slavek.banko@axis.cz> | 2022-05-11 00:35:26 +0200 |
| commit | ac6e37dd9ea81fe4f514dc2ca64ed867ca20b33b (patch) | |
| tree | 276ae5a176b6cb3688076dcd944735356623ed1c /siplib/sip.h | |
| parent | 5e00e331b79ece72843aa62af1a79090d0997a0e (diff) | |
| download | sip4-tqt-ac6e37dd9ea81fe4f514dc2ca64ed867ca20b33b.tar.gz sip4-tqt-ac6e37dd9ea81fe4f514dc2ca64ed867ca20b33b.zip | |
Improve the "underlying C/C++ object has been deleted" message
python-tqt is reporting "underlying C/C++ object has been deleted". This
is rather unhelpful. A little code has been backported from the equivalent
source files in sip 4.19.23 to make it a little clearer about what is
going wrong (original author Riverbank Computing Limited
<info@riverbankcomputing.com>, licensed under GPL version 2 or 3).
Signed-off-by: aneejit1 <aneejit1@gmail.com>
(cherry picked from commit c9762bd162d2c0c33fec1dc1bce2c5a70357d6c8)
Diffstat (limited to 'siplib/sip.h')
| -rw-r--r-- | siplib/sip.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/siplib/sip.h b/siplib/sip.h index 48180a3..2f036bd 100644 --- a/siplib/sip.h +++ b/siplib/sip.h @@ -1432,6 +1432,7 @@ typedef struct _sipTQtAPI { #define SIP_SHARE_MAP 0x0040 /* If the map slot might be occupied. */ #define SIP_CPP_HAS_REF 0x0080 /* If C/C++ has a reference. */ #define SIP_POSSIBLE_PROXY 0x0100 /* If there might be a proxy slot. */ +#define SIP_CREATED 0x1000 /* If the C/C++ object has been created. */ #define sipIsPyOwned(w) ((w)->flags & SIP_PY_OWNED) #define sipSetPyOwned(w) ((w)->flags |= SIP_PY_OWNED) @@ -1446,6 +1447,7 @@ typedef struct _sipTQtAPI { #define sipResetCppHasRef(w) ((w)->flags &= ~SIP_CPP_HAS_REF) #define sipPossibleProxy(w) ((w)->flags & SIP_POSSIBLE_PROXY) #define sipSetPossibleProxy(w) ((w)->flags |= SIP_POSSIBLE_PROXY) +#define sipWasCreated(sw) ((sw)->flags & SIP_CREATED) #define SIP_TYPE_TYPE_MASK 0x0007 /* The type type mask. */ |
