Returning structs in c_func

new topic     » topic index » view thread      » older message » newer message

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

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu