Re: C++11: GLIBMM_INITIALIZE_STRUCT



2013-07-09 11:02, Murray Cumming skrev:
On Mon, 2013-07-08 at 15:54 +0200, Kjell Ahlstedt wrote:
Do we really need GLIBMM_INITIALIZE_STRUCT?
It seems to be used in all boxed-type wrappers, but there are not so
many of them.

  There are 3 uses in glibmm and 6 in gtkmm. They can easily be
replaced by std::memset().
Would you like to try that?

I had not noticed that most occurrences of GLIBMM_INITIALIZE_STRUCT are in code generated by gmmproc.

I have just pushed a patch that replaces GLIBMM_INITIALIZE_STRUCT by std::memset() in the code generated by _CLASS_BOXEDTYPE_STATIC, and in other glibmm code. All GLIBMM_INITIALIZE_STRUCTs in gtkmm and other packages that I've checked come from _CLASS_BOXEDTYPE_STATIC. They will disappear when the code is regenerated with an updated versioin of gmmproc.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]