/** * gwy_type_init: * * Makes libgwyddion types safe for deserialization and performs other * initialization. You have to call this function before using objects * from libgwyddion. * * Calls g_type_init() first to make sure GLib object system is initialized. * * It is safe to call this function more than once, subsequent calls are no-op. **/ void gwy_type_init(void) { static gboolean types_initialized = FALSE; if (types_initialized) return; g_type_init(); g_type_class_peek(GWY_TYPE_SI_UNIT); g_type_class_peek(GWY_TYPE_CONTAINER); g_type_class_peek(GWY_TYPE_INVENTORY); g_type_class_peek(GWY_TYPE_RESOURCE); g_type_class_peek(GWY_TYPE_NLFIT_PRESET); g_type_class_peek(GWY_TYPE_STRING_LIST); types_initialized = gwy_enum_get_type(); _gwy_nlfit_preset_class_setup_presets(); }
/** * gwy_type_init: * * Makes libgwyddion types safe for deserialization and performs other * initialization. You have to call this function before using objects * from libgwyddion. * * Calls g_type_init() first to make sure GLib object system is initialized. * * It is safe to call this function more than once, subsequent calls are no-op. **/ void gwy_type_init(void) { static gboolean types_initialized = FALSE; if (types_initialized) return; #if (!GLIB_CHECK_VERSION(2, 36, 0)) g_type_init(); #endif g_type_class_peek(GWY_TYPE_SI_UNIT); g_type_class_peek(GWY_TYPE_CONTAINER); g_type_class_peek(GWY_TYPE_INVENTORY); g_type_class_peek(GWY_TYPE_RESOURCE); g_type_class_peek(GWY_TYPE_NLFIT_PRESET); g_type_class_peek(GWY_TYPE_FD_CURVE_PRESET); g_type_class_peek(GWY_TYPE_STRING_LIST); types_initialized = gwy_enum_get_type(); _gwy_nlfit_preset_class_setup_presets(); _gwy_fd_curve_preset_class_setup_presets(); }