Add struct offsets to field and vfunc elements.

2005-05-22  Matthias Clasen  <mclasen@redhat.com>

	* tests/*: Add struct offsets to field and vfunc
	elements.

	* src/generate.c (write_vfunc_info): Write offset
	information for vfuncs.

	* src/gidlnode.c (g_idl_node_build_metadata): Write
	the struct offsets into the metadata.

	* src/gidlparser.c: Parse the offset attributes of
	field and vfunc elements.

	* src/gidlnode.h: Add offset members to field and
	vfunc nodes.
This commit is contained in:
Matthias Clasen 2005-05-22 04:22:51 +00:00 committed by Philip Withnall
parent 1ae704b2b7
commit b1cf4d87c9

View File

@ -657,10 +657,12 @@ write_vfunc_info (const gchar *namespace,
GIVFuncInfoFlags flags;
const gchar *name;
gboolean deprecated;
gint offset;
name = g_base_info_get_name ((GIBaseInfo *)info);
flags = g_vfunc_info_get_flags (info);
deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
offset = g_vfunc_info_get_offset (info);
g_fprintf (file, " <vfunc name=\"%s\"", name);
@ -675,6 +677,7 @@ write_vfunc_info (const gchar *namespace,
else if (flags & GI_VFUNC_MUST_NOT_OVERRIDE)
g_fprintf (file, " override=\"never\"");
g_fprintf (file, " offset=\"%d\"", offset);
g_fprintf (file, ">\n");
write_callable_info (namespace, (GICallableInfo*)info, file, 6);