Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-593

Fix illegal Macro usage in pysidesignal.cpp


    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.6, 5.9, dev
    • Fix Version/s: 5.9
    • Component/s: PySide
    • Labels:
    • Commits:


      During the development of PYSIDE-560 (PEP384), file methodobject.h, I stumbled over a problem that I first could not fix: In PEP384, almost all macros need to be replaced by functions. When I tried that with PyCFunction_GET_FLAGS, I got a runtime error in pysidesignal.cpp !

      The only reason that a macro cannot be replaced by its function counterpart is an illegal usage of the macro, and the function activates a runtime check that the macro ignores.

      It turned out that this file uses the macro without checking that it is really treating a PyCFunction object. I have not yet analyzed this error and disabled the support for methodobject.h until this problem has been further investigated. It should be inspected carefully, especially about the flag usage and what to do instead if the function is no PyCFunction.

      The erroneous macro call is in function signalCall, line 576.


        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            • Assignee:
              alexandru.croitor Alexandru Croitor
              ctismer Christian Tismer
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:

                Gerrit Reviews

                There is 1 open Gerrit change