]> Pileus Git - grits/blobdiff - src/gis-tile.c
Update API docs
[grits] / src / gis-tile.c
index 61403347d83567a78b614c1c2913f9a44a89c4f9..cf3f85777743042923693282ada0e6d9d9dc3b96 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
+ * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ gchar *gis_tile_path_table[2][2] = {
 GisTile *gis_tile_new(GisTile *parent,
        gdouble n, gdouble s, gdouble e, gdouble w)
 {
-       GisTile *self = g_new0(GisTile, 1);
+       GisTile *self = g_object_new(GIS_TYPE_TILE, NULL);
        self->parent = parent;
        self->edge.n = n;
        self->edge.s = s;
@@ -190,5 +190,10 @@ void gis_tile_free(GisTile *self, GisTileFreeFunc free_func, gpointer user_data)
                gis_tile_free(child, free_func, user_data);
        if (free_func)
                free_func(self, user_data);
-       g_free(self);
+       g_object_unref(self);
 }
+
+/* GObject code */
+G_DEFINE_TYPE(GisTile, gis_tile, GIS_TYPE_OBJECT);
+static void gis_tile_init(GisTile *self) { }
+static void gis_tile_class_init(GisTileClass *klass) { }