Re: Using By-Value Compound Getters (Re: gtk_widget_get_allocation)



On 04/21/2009 04:11 PM, Kalyanov Dmitry wrote:
I think that using pass-by-value struct will bring more headache for language
bindings developers, because this complicates ABI and not every language's
foreign function interface supports passing structs by value. (I think that
passing structs by value is not part of C language, but of C++ (or am I
wrong?),

I think you are wrong.

behdad


so it is problematic to support)
I would support having both kinds of accessors: "simple" ones (option "a") and
convenient for C (option "b"). Just the same as with other kinds of functions,
e.g., g_object_get and g_object_get_property. One part of interface for
convenience of C programming, one part for convenience of other languages.



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