Skip to content

Commit

Permalink
[GLib] Rewrite with G_DECLARE_DERIVABLE_TYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkn committed Mar 17, 2019
1 parent 8ab3255 commit 47af12d
Showing 1 changed file with 6 additions and 37 deletions.
43 changes: 6 additions & 37 deletions c_glib/arrow-glib/array-builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,48 +45,17 @@ GArrowArray *garrow_array_builder_finish (GArrowArrayBuilder *builder,
GError **error);


#define GARROW_TYPE_NULL_ARRAY_BUILDER \
(garrow_null_array_builder_get_type())
#define GARROW_NULL_ARRAY_BUILDER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
GARROW_TYPE_NULL_ARRAY_BUILDER, \
GArrowNullArrayBuilder))
#define GARROW_NULL_ARRAY_BUILDER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), \
GARROW_TYPE_NULL_ARRAY_BUILDER, \
GArrowNullArrayBuilderClass))
#define GARROW_IS_NULL_ARRAY_BUILDER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), \
GARROW_TYPE_NULL_ARRAY_BUILDER))
#define GARROW_IS_NULL_ARRAY_BUILDER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), \
GARROW_TYPE_NULL_ARRAY_BUILDER))
#define GARROW_NULL_ARRAY_BUILDER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), \
GARROW_TYPE_NULL_ARRAY_BUILDER, \
GArrowNullArrayBuilderClass))

typedef struct _GArrowNullArrayBuilder GArrowNullArrayBuilder;
typedef struct _GArrowNullArrayBuilderClass GArrowNullArrayBuilderClass;

/**
* GArrowNullArrayBuilder:
*
* It wraps `arrow::NullBuilder`.
*/
struct _GArrowNullArrayBuilder
{
/*< private >*/
GArrowArrayBuilder parent_instance;
};

#define GARROW_TYPE_NULL_ARRAY_BUILDER (garrow_null_array_builder_get_type())
G_DECLARE_DERIVABLE_TYPE(GArrowNullArrayBuilder,
garrow_null_array_builder,
GARROW,
NULL_ARRAY_BUILDER,
GArrowArrayBuilder)
struct _GArrowNullArrayBuilderClass
{
GArrowArrayBuilderClass parent_class;
};

GType garrow_null_array_builder_get_type(void) G_GNUC_CONST;

GArrowNullArrayBuilder *garrow_null_array_builder_new(void);

gboolean garrow_null_array_builder_append_null(GArrowNullArrayBuilder *builder,
Expand Down

0 comments on commit 47af12d

Please sign in to comment.