Returning structs in c_func
- Posted by ghaberek (admin) Jul 03, 2013
- 2261 views
Forked from Re: Need help with creating a GUI window on Linux using libxcb.so XCB API
jimcbrown said...
Here's a C wrapper, if you want/need to use that version of the code instead:
/* C wrapper for dealing with C functions that return structs */ #include <xcb/xcb.h> xcb_screen_iterator_t * eu_xcb_setup_roots_iterator(const xcb_setup_t * setup) { xcb_screen_iterator_t iter = xcb_setup_roots_iterator(setup); return &iter; }
Side note: I know Matt's been working on struct support for 4.1. Any chance that could make its way to returning structs-by-value via c_func? This would help with a few other libraries as well.
-Greg