Changeset 843b22f


Ignore:
Timestamp:
Jun 29, 2019, 12:48:50 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/crepe, feature/crepe_org, feature/timestretch, fix/ffmpeg5, master
Children:
2244f00
Parents:
673d7e3
Message:

[py] incref exception type before restoring it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/py-filterbank.c

    r673d7e3 r843b22f  
    327327      PyObject *type, *value, *traceback;
    328328      PyErr_Fetch(&type, &value, &traceback);
    329       PyErr_Restore(PyExc_ValueError, value, traceback);
     329      Py_XDECREF(type);
     330      type = PyExc_ValueError;
     331      Py_XINCREF(type);
     332      PyErr_Restore(type, value, traceback);
    330333    }
    331334    return NULL;
     
    352355      PyObject *type, *value, *traceback;
    353356      PyErr_Fetch(&type, &value, &traceback);
    354       PyErr_Restore(PyExc_ValueError, value, traceback);
     357      Py_XDECREF(type);
     358      type = PyExc_ValueError;
     359      Py_XINCREF(type);
     360      PyErr_Restore(type, value, traceback);
    355361    }
    356362    return NULL;
     
    381387      PyObject *type, *value, *traceback;
    382388      PyErr_Fetch(&type, &value, &traceback);
    383       PyErr_Restore(PyExc_ValueError, value, traceback);
     389      Py_XDECREF(type);
     390      type = PyExc_ValueError;
     391      Py_XINCREF(type);
     392      PyErr_Restore(type, value, traceback);
    384393    }
    385394    return NULL;
     
    410419      PyObject *type, *value, *traceback;
    411420      PyErr_Fetch(&type, &value, &traceback);
    412       PyErr_Restore(PyExc_ValueError, value, traceback);
     421      Py_XDECREF(type);
     422      type = PyExc_ValueError;
     423      Py_XINCREF(type);
     424      PyErr_Restore(type, value, traceback);
    413425    }
    414426    return NULL;
     
    464476      PyObject *type, *value, *traceback;
    465477      PyErr_Fetch(&type, &value, &traceback);
    466       PyErr_Restore(PyExc_ValueError, value, traceback);
     478      Py_XDECREF(type);
     479      type = PyExc_ValueError;
     480      Py_XINCREF(type);
     481      PyErr_Restore(type, value, traceback);
    467482    }
    468483    return NULL;
     
    494509      PyObject *type, *value, *traceback;
    495510      PyErr_Fetch(&type, &value, &traceback);
    496       PyErr_Restore(PyExc_ValueError, value, traceback);
     511      Py_XDECREF(type);
     512      type = PyExc_ValueError;
     513      Py_XINCREF(type);
     514      PyErr_Restore(type, value, traceback);
    497515    }
    498516    return NULL;
Note: See TracChangeset for help on using the changeset viewer.