/* LIBPIKA - The PIKA Library * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * pikabase-private.c * Copyright (C) 2003 Sven Neumann * * This library is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see * . */ #include "config.h" #include #include "pikabasetypes.h" #include "pikabase-private.h" #include "pikacompatenums.h" PikaUnitVtable _pika_unit_vtable = { NULL, }; void pika_base_init (PikaUnitVtable *vtable) { static gboolean pika_base_initialized = FALSE; g_return_if_fail (vtable != NULL); if (pika_base_initialized) g_error ("pika_base_init() must only be called once!"); _pika_unit_vtable = *vtable; pika_base_compat_enums_init (); pika_base_initialized = TRUE; } void pika_base_compat_enums_init (void) { #if 0 static gboolean pika_base_compat_initialized = FALSE; GQuark quark; if (pika_base_compat_initialized) return; quark = g_quark_from_static_string ("pika-compat-enum"); /* This is how a compat enum is registered, leave one here for * documentation purposes, remove it as soon as we get a real * compat enum again */ g_type_set_qdata (PIKA_TYPE_ADD_MASK_TYPE, quark, (gpointer) PIKA_TYPE_ADD_MASK_TYPE_COMPAT); pika_base_compat_initialized = TRUE; #endif }