GNOME Bugzilla – Bug 730230
xcb: Add helper methods for GetPropertyReply
Last modified: 2014-06-01 10:23:08 UTC
Add helper methods for GetPropertyReply so you don't have to access a void pointer.
Created attachment 276650 [details] [review] Add helper methods for GetPropertyReply
Created attachment 276739 [details] [review] Add helper methods for GetPropertyReply Don't copy arrays
Comment on attachment 276650 [details] [review] Add helper methods for GetPropertyReply Please eliminate the new line before the {. "public string value_as_string () {" instead of "public string value_as_string ()\n\t\t{" For the array functions, I think it would be better to return unowned arrays--vala can copy automatically if you assign the return value to an owned variable, but by returning unowned at least a copy isn't /required/. Something like: public unowned uint8[] value_as_uint8_array () { GLib.assert (format == 8); unowned uint8[] v = (uint8[]) this.value (); v.length = this.value_length (); return v; }
Comment on attachment 276739 [details] [review] Add helper methods for GetPropertyReply Heh, should have looked at both before reviewing the first. The return values should be unowned, and the curly braces on the previous line, but other than that this looks good.
Pushed with requested changes, thanks Evan!