Skip to content

Commit

Permalink
update siplib source
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinD42 committed Jun 17, 2020
1 parent e10edf0 commit 815a5ea
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sip/siplib/sip.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The SIP module interface.
*
* Copyright (c) 2018 Riverbank Computing Limited <[email protected]>
* Copyright (c) 2020 Riverbank Computing Limited <[email protected]>
*
* This file is part of SIP.
*
Expand Down Expand Up @@ -54,8 +54,8 @@ extern "C" {
/*
* Define the SIP version number.
*/
#define SIP_VERSION 0x041313
#define SIP_VERSION_STR "4.19.19"
#define SIP_VERSION 0x041317
#define SIP_VERSION_STR "4.19.23"


/*
Expand Down
19 changes: 18 additions & 1 deletion sip/siplib/siplib.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SIP library code.
*
* Copyright (c) 2019 Riverbank Computing Limited <[email protected]>
* Copyright (c) 2020 Riverbank Computing Limited <[email protected]>
*
* This file is part of SIP.
*
Expand Down Expand Up @@ -9338,6 +9338,7 @@ static PyObject *sip_api_get_reference(PyObject *self, int key)
return NULL;

obj = PyDict_GetItem(dict, key_obj);
Py_DECREF(key_obj);
Py_XINCREF(obj);

return obj;
Expand Down Expand Up @@ -11320,6 +11321,11 @@ static SIP_SSIZE_T sipSimpleWrapper_getcharbuffer(sipSimpleWrapper *self,
*/
static void sipSimpleWrapper_dealloc(sipSimpleWrapper *self)
{
PyObject *error_type, *error_value, *error_traceback;

/* Save the current exception, if any. */
PyErr_Fetch(&error_type, &error_value, &error_traceback);

forgetObject(self);

/*
Expand All @@ -11331,6 +11337,9 @@ static void sipSimpleWrapper_dealloc(sipSimpleWrapper *self)

/* Call the standard super-type dealloc. */
PyBaseObject_Type.tp_dealloc((PyObject *)self);

/* Restore the saved exception. */
PyErr_Restore(error_type, error_value, error_traceback);
}


Expand Down Expand Up @@ -11727,6 +11736,11 @@ static int sipWrapper_clear(sipWrapper *self)
*/
static void sipWrapper_dealloc(sipWrapper *self)
{
PyObject *error_type, *error_value, *error_traceback;

/* Save the current exception, if any. */
PyErr_Fetch(&error_type, &error_value, &error_traceback);

/*
* We can't simply call the super-type because things have to be done in a
* certain order. The first thing is to get rid of the wrapped instance.
Expand All @@ -11737,6 +11751,9 @@ static void sipWrapper_dealloc(sipWrapper *self)

/* Skip the super-type's dealloc. */
PyBaseObject_Type.tp_dealloc((PyObject *)self);

/* Restore the saved exception. */
PyErr_Restore(error_type, error_value, error_traceback);
}


Expand Down

0 comments on commit 815a5ea

Please sign in to comment.