[gnome-builder] clang: implement get_symbols_async vfunc
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] clang: implement get_symbols_async vfunc
- Date: Sun, 29 Mar 2015 08:02:54 +0000 (UTC)
commit bc9363793e8b9e7d1fbfd8876aaca95beef34def
Author: Christian Hergert <christian hergert me>
Date: Sun Mar 29 00:57:03 2015 -0700
clang: implement get_symbols_async vfunc
libide/clang/ide-clang-symbol-resolver.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/libide/clang/ide-clang-symbol-resolver.c b/libide/clang/ide-clang-symbol-resolver.c
index ab38c45..e919006 100644
--- a/libide/clang/ide-clang-symbol-resolver.c
+++ b/libide/clang/ide-clang-symbol-resolver.c
@@ -132,6 +132,7 @@ ide_clang_symbol_resolver_get_symbols_cb (GObject *object,
g_autoptr(IdeClangTranslationUnit) unit = NULL;
g_autoptr(GTask) task = user_data;
g_autoptr(GPtrArray) ret = NULL;
+ IdeFile *file;
GError *error = NULL;
IDE_ENTRY;
@@ -147,7 +148,10 @@ ide_clang_symbol_resolver_get_symbols_cb (GObject *object,
IDE_EXIT;
}
- ret = g_ptr_array_new ();
+ file = g_task_get_task_data (task);
+ g_assert (IDE_IS_FILE (file));
+
+ ret = ide_clang_translation_unit_get_symbols (unit, file);
g_task_return_pointer (task, g_ptr_array_ref (ret), (GDestroyNotify)g_ptr_array_unref);
@@ -176,6 +180,7 @@ ide_clang_symbol_resolver_get_symbols_async (IdeSymbolResolver *resolver,
service = ide_context_get_service_typed (context, IDE_TYPE_CLANG_SERVICE);
task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_task_data (task, g_object_ref (file), g_object_unref);
ide_clang_service_get_translation_unit_async (service,
file,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]