After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709976 - Add zero copy support for struct wrapped buffers and arrays
Add zero copy support for struct wrapped buffers and arrays
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on: 709700 723736
Blocks: 678663
 
 
Reported: 2013-10-12 10:21 UTC by Simon Feltman
Modified: 2018-01-10 20:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add wrapped GArray (19.00 KB, patch)
2013-10-12 10:27 UTC, Simon Feltman
needs-work Details | Review
add __gbufferinfo__ (7.80 KB, patch)
2013-10-12 10:29 UTC, Simon Feltman
none Details | Review
tests: Consolidate struct and boxed tests (28.43 KB, patch)
2016-10-23 08:48 UTC, Simon Feltman
none Details | Review
Add memoryview support to gi structs and boxed structs (19.75 KB, patch)
2016-10-23 08:52 UTC, Simon Feltman
none Details | Review

Description Simon Feltman 2013-10-12 10:21:24 UTC
The idea is we can use GArrays in Python wrapped with a memoryview object. This would allow potentially zero copy for buffers in certain cases.
Comment 1 Simon Feltman 2013-10-12 10:27:16 UTC
Created attachment 257095 [details] [review]
Add wrapped GArray

Very rough implementation which relies on memoryview for implementing the 
various sequence and item protocols.
Comment 2 Simon Feltman 2013-10-12 10:29:24 UTC
Created attachment 257097 [details] [review]
add __gbufferinfo__

Work in progress for supporting a custom "__pygi_getbufferinfo__" method for 
overrides. The idea GI overrides could implement this and specify 
information on how to create a Python buffer object from the objects 
internal fields.
Comment 3 Simon Feltman 2014-02-06 03:52:00 UTC
Adding this feature would break caller expectation and should require explicit enablement. This bug now depends on bug 723736.
Comment 4 Simon Feltman 2016-10-23 08:48:58 UTC
Created attachment 338279 [details] [review]
tests: Consolidate struct and boxed tests
Comment 5 Simon Feltman 2016-10-23 08:52:39 UTC
Created attachment 338280 [details] [review]
Add memoryview support to gi structs and boxed structs
Comment 6 GNOME Infrastructure Team 2018-01-10 20:34:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pygobject/issues/57.