Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
pygobject
pygobject
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 242
    • Issues 242
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • pygobjectpygobject
  • Issues
  • #279

Closed
Open
Opened Nov 23, 2018 by Tom Schoonjans@tschoonj

G_TYPE_BOOLEAN signal argument always translated into False, regardless of actual value

I am seeing the behavior described in the title with a signal that has been created as:

        signals[FINISHED_EVENT] = g_signal_new(
                "finished-event",
                G_TYPE_FROM_CLASS(klass),
                G_SIGNAL_RUN_LAST,
                0, // no default handler
                NULL,
                NULL,
                xmi_VOID__BOOLEAN_STRING,
                G_TYPE_NONE,
                2,
                G_TYPE_BOOLEAN, // gboolean -> result
                G_TYPE_STRING // gchar* -> buffer
        );

Now when I emit this signal (from C, not Python), the signal callback in Python always receives False, regardless of what was provided to g_signal_emit...

    def _test_succeed_finished_cb(self, job, result, buffer):
        self.main_loop.quit()
        self.assertTrue(result)
        print("message: {}".format(buffer))

The buffer string is passed through without problems. I have tried this on both macOS (3.30.2) and Linux (3.22.0), and I get the same incorrect behaviour.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/pygobject#279