[gjs: 3/11] context: Fix bad formatting
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 3/11] context: Fix bad formatting
- Date: Fri, 8 Oct 2021 22:02:27 +0000 (UTC)
commit fd7ec123bce1477e87e9c63ef185a784ff9215f0
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Sep 26 16:13:14 2021 -0700
context: Fix bad formatting
Make an incorrectly formatted line obsolete by using auto pointers.
gjs/context.cpp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gjs/context.cpp b/gjs/context.cpp
index 38526075..1f10442d 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -313,14 +313,15 @@ gjs_context_class_init(GjsContextClass *klass)
if (!g_getenv("GJS_USE_UNINSTALLED_FILES")) {
#ifdef G_OS_WIN32
extern HMODULE gjs_dll;
- char *basedir = g_win32_get_package_installation_directory_of_module (gjs_dll);
- char *priv_typelib_dir = g_build_filename (basedir, "lib", "gjs", "girepository-1.0", NULL);
- g_free (basedir);
+ GjsAutoChar basedir =
+ g_win32_get_package_installation_directory_of_module(gjs_dll);
+ GjsAutoChar priv_typelib_dir = g_build_filename(
+ basedir, "lib", "gjs", "girepository-1.0", nullptr);
#else
- char *priv_typelib_dir = g_build_filename (PKGLIBDIR, "girepository-1.0", NULL);
+ GjsAutoChar priv_typelib_dir =
+ g_build_filename(PKGLIBDIR, "girepository-1.0", nullptr);
#endif
g_irepository_prepend_search_path(priv_typelib_dir);
- g_free (priv_typelib_dir);
}
gjs_register_native_module("_byteArrayNative", gjs_define_byte_array_stuff);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]