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 239
    • Issues 239
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 10
    • Merge Requests 10
  • 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
  • #139

Closed
Open
Opened Jul 22, 2017 by bugzilla-migration@bugzilla-migrationReporter

Modifying GHashTable in-place doesn't work

Submitted by Igor Gnatenko

Link to original bug (#785264)

Description

I have code which looks like

  /**
   * ModulemdModuleMetadata:buildrequires: (type GLib.HashTable(utf8,utf8)) (transfer full)
   */
  properties [PROP_BUILDREQUIRES] =
    g_param_spec_boxed ("buildrequires",
                        "Module BuildRequires",
                        "A dictionary property representing the required "
                        "build dependencies of the module. Keys are the "
                        "required module names (strings), values are their "
                        "required stream names (also strings).",
                        G_TYPE_HASH_TABLE,
                        G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);

I've tried all transfer methods (none, container, full), but if I do

foo.props.buildrequires["bar"] = "baz"

And then print(foo.props.buildrequires), it is not modified. In get_property() I return g_hash_table_ref (self->buildrequires), so I expect that really to work.

Let me know if I should provide some more details or this is a bug or I'm just dumb.

Edited Apr 09, 2018 by Christoph Reiter
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/pygobject#139