static void ide_worker_manager_init (IdeWorkerManager *self) { DZL_COUNTER_INC (instances); self->plugin_name_to_worker = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, ide_worker_manager_force_exit_worker); }
IdeMakecacheTarget * ide_makecache_target_new (const gchar *subdir, const gchar *target) { IdeMakecacheTarget *self; g_assert (target); if (subdir != NULL && (subdir [0] == '.' || subdir [0] == '\0')) subdir = NULL; self = g_slice_new0 (IdeMakecacheTarget); self->ref_count = 1; self->subdir = g_strdup (subdir); self->target = g_strdup (target); DZL_COUNTER_INC (instances); return self; }
/** * ide_source_location_new: * @file: an #IdeFile * @line: the line number starting from zero * @line_offset: the character offset within the line * @offset: the character offset in the file * * Creates a new #IdeSourceLocation, using the file, line, column, and character * offset provided. * * Returns: (transfer full): A newly allocated #IdeSourceLocation. */ IdeSourceLocation * ide_source_location_new (IdeFile *file, guint line, guint line_offset, guint offset) { IdeSourceLocation *ret; g_return_val_if_fail (IDE_IS_FILE (file), NULL); ret = g_slice_new0 (IdeSourceLocation); ret->ref_count = 1; ret->file = g_object_ref (file); ret->line = MIN (G_MAXINT, line); ret->line_offset = MIN (G_MAXINT, line_offset); ret->offset = offset; DZL_COUNTER_INC (instances); return ret; }