Re: [gtk-list] Re: Marshallers, _interp, and the Meaning of Life
- From: Jay Bloodworth <jay pathways sde state sc us>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Marshallers, _interp, and the Meaning of Life
- Date: Tue, 10 Feb 1998 15:46:48 -0500 (EST)
On Tue, 10 Feb 1998, Tim Janik wrote:
[good explanation of marshalling snipped]
Thanks, that was very helpful. One more question:
>
> which without marshalling would have looked like
> static void
> gtk_real_window_move_resize (GtkObject *object,
> gpointer func_data,
> GtkArg *args)
> {
> gint *x;
> gint *y;
> gint width;
> gint height;
> gint *return_val;
>
> return_val = GTK_RETLOC_BOOL (args[4]);
> x = GTK_VALUE_POINTER (args[0]);
> y = GTK_VALUE_POINTER (args[1]);
> width = GTK_VALUE_INT (args[2]);
> height = GTK_VALUE_INT (args[3]);
>
> [...]
>
> *return_val = something_that_came_out_of_the_function;
> }
>
So marshalling basically moves the code that references, casts, and names
arguments in the GtkArg array into a separate function. I see how this is
a big win in terms of program neatness, especially if you aren't concerned
with the situations that require marshallers. Are there any other
advantages to using a marshalling system?
Jay
+---------------------------------+------------------------------+
| Jay Bloodworth | jay@pathways.sde.state.sc.us |
| Network Technician | Voice: (803) 734-7000 |
| SC Department of Education | Fax: (803) 734-4064 |
+---------------------------------+------------------------------+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]