Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 857
    • Issues 857
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 56
    • Merge requests 56
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Merge requests
  • !3128

garray: Add more G(Ptr)Array constructors to take or copy C arrays

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Marco Trevisan requested to merge 3v1n0/glib:ptr-array-new-take into main Dec 14, 2022
  • Overview 53
  • Commits 7
  • Pipelines 21
  • Changes 4

GPtrArray and GArray are a nice interface to handle (pointer) arrays (and way more efficient than GList). However if we need to handle a C-array or a strv so that can be modified easily we need to perform copies or re-add all the values manually, so adding some utility functions to create array stealing or copying from data.

I've been doing this as I was starting moving away from usage of G(S)List in some internal places, and this may help to avoid duplication.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ptr-array-new-take