gst/gstdata.c (gst_data_get_type): New function, register

Original commit message from CVS:
* gst/gstdata.c (gst_data_get_type): New function, register
GstData as a GBoxed type.

* gst/gstdata.h (GST_TYPE_DATA): New macro
This commit is contained in:
Johan Dahlin 2004-02-27 17:58:24 +00:00
parent 1981690631
commit 730dd21ce5
3 changed files with 25 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2004-02-27 Johan Dahlin <johan@gnome.org>
* gst/gstdata.c (gst_data_get_type): New function, register
GstData as a GBoxed type.
* gst/gstdata.h (GST_TYPE_DATA): New macro
2004-02-27 Thomas Vander Stichele <thomas at apestaart dot org>
* Makefile.am:

View file

@ -27,6 +27,18 @@
#include "gstdata_private.h"
#include "gstinfo.h"
GType
gst_data_get_type (void)
{
static GType type = 0;
if (!type)
type = g_boxed_type_register_static ("GstData",
(GBoxedCopyFunc) gst_data_copy,
(GBoxedFreeFunc) gst_data_free);
return type;
}
/**
* gst_data_init:
* @data: a #GstData to initialize

View file

@ -41,6 +41,9 @@ G_BEGIN_DECLS
#define GST_DATA_FLAG_SET(data,flag) G_STMT_START{ (GST_DATA_FLAGS(data) |= (1<<(flag))); }G_STMT_END
#define GST_DATA_FLAG_UNSET(data,flag) G_STMT_START{ (GST_DATA_FLAGS(data) &= ~(1<<(flag))); }G_STMT_END
/* Macros for the GType */
#define GST_TYPE_DATA (gst_data_get_type ())
typedef struct _GstData GstData;
typedef void (*GstDataFreeFunction) (GstData *data);
@ -96,6 +99,9 @@ GstData* gst_data_ref (GstData* data);
GstData* gst_data_ref_by_count (GstData* data, gint count);
void gst_data_unref (GstData* data);
/* GType for GstData */
GType gst_data_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GST_DATA_H__ */