Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Günther Wagner
gnome-builder
Commits
0857b1de
Commit
0857b1de
authored
Jan 17, 2018
by
Christian Hergert
Browse files
clang: add g_auto() helpers
parent
48758207
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/clang/ide-clang-private.h
View file @
0857b1de
...
...
@@ -33,7 +33,9 @@ IdeClangTranslationUnit *_ide_clang_translation_unit_new (IdeContext
IdeHighlightIndex
*
index
,
gint64
serial
);
void
_ide_clang_dispose_diagnostic
(
CXDiagnostic
*
diag
);
void
_ide_clang_dispose_index
(
CXIndex
*
index
);
void
_ide_clang_dispose_string
(
CXString
*
str
);
void
_ide_clang_dispose_unit
(
CXTranslationUnit
*
unit
);
IdeSymbolNode
*
_ide_clang_symbol_node_new
(
IdeContext
*
context
,
CXCursor
cursor
);
CXCursor
_ide_clang_symbol_node_get_cursor
(
IdeClangSymbolNode
*
self
);
...
...
@@ -42,6 +44,9 @@ void _ide_clang_symbol_node_set_children (IdeClangSymbolNode
GArray
*
children
);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC
(
CXString
,
_ide_clang_dispose_string
)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC
(
CXIndex
,
_ide_clang_dispose_index
)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC
(
CXTranslationUnit
,
_ide_clang_dispose_unit
)
G_DEFINE_AUTOPTR_CLEANUP_FUNC
(
CXDiagnostic
,
_ide_clang_dispose_diagnostic
)
G_END_DECLS
src/plugins/clang/ide-clang-service.c
View file @
0857b1de
...
...
@@ -829,3 +829,17 @@ _ide_clang_dispose_diagnostic (CXDiagnostic *diag)
if
(
diag
!=
NULL
)
clang_disposeDiagnostic
(
diag
);
}
void
_ide_clang_dispose_index
(
CXIndex
*
idx
)
{
if
(
idx
!=
NULL
&&
*
idx
!=
NULL
)
clang_disposeIndex
(
*
idx
);
}
void
_ide_clang_dispose_unit
(
CXTranslationUnit
*
unit
)
{
if
(
unit
!=
NULL
&&
*
unit
!=
NULL
)
clang_disposeTranslationUnit
(
*
unit
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment