Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pygobject pygobject
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 308
    • Issues 308
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • pygobjectpygobject
  • Merge requests
  • !14

to-py-struct: don't copy the boxed if we are the sole owner of the wrapper

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Christoph Reiter requested to merge creiter/pygobject:dont-copy-unowned-boxed into master Jan 30, 2018
  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 1

In commit 7ed81918 things were changed to copy the wrapped boxed after the Python function returned. In case the wrapper is only used during the call there is no need to copy the boxed as the wrapper will be freed anyway.

Add a special case and don't copy the boxed in case the refcount at cleanup is only 1. This should speed up the common case.

thanks to @mathieudu for suggesting this

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: dont-copy-unowned-boxed