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

Fix illegal Macro usage in pysidesignal.cpp

    XMLWordPrintable

    Details

    • 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:
      375a8565e1a0f6e0327d50657ac0f08045012809

      Description

      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.

        Attachments

        For Gerrit Dashboard: PYSIDE-593
        # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There is 1 open Gerrit change