Commit 5857c591 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Unbreak the ABI

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 28e62822
......@@ -11,8 +11,8 @@ VERSION = ${GIRARA_VERSION_MAJOR}.${GIRARA_VERSION_MINOR}.${GIRARA_VERSION_REV}
# * If any of the exported datastructures have changed in a incompatible way
# bump SOMAJOR and set SOMINOR to 0.
# * If a function has been added bump SOMINOR.
SOMAJOR = 2
SOMINOR = 0
SOMAJOR = 1
SOMINOR = 1
SOVERSION = ${SOMAJOR}.${SOMINOR}
# paths
......
......@@ -79,7 +79,8 @@ girara_session_create()
(girara_free_function_t) girara_argument_mapping_free);
/* command history */
session->global.command_history = girara_input_history_new(NULL);
session->command_history = girara_input_history_new(NULL);
session->global.command_history = girara_get_command_history(session);
/* load default values */
girara_config_load_default(session);
......@@ -408,8 +409,8 @@ girara_session_destroy(girara_session_t* session)
session->settings = NULL;
/* clean up input histry */
g_object_unref(session->global.command_history);
session->global.command_history = NULL;
g_object_unref(session->command_history);
session->command_history = NULL;
/* clean up statusbar items */
girara_list_free(session->elements.statusbar_items);
......@@ -623,5 +624,5 @@ girara_list_t*
girara_get_command_history(girara_session_t* session)
{
g_return_val_if_fail(session != NULL, FALSE);
return girara_input_history_list(session->global.command_history);
return girara_input_history_list(session->command_history);
}
......@@ -117,7 +117,7 @@ struct girara_session_s
{
GString *buffer; /**< Buffer */
void* data; /**< User data */
GiraraInputHistory* command_history; /**< Command history */
girara_list_t* GIRARA_DEPRECATED(command_history); /**< Command history (deprecated) */
bool autohide_inputbar; /**< Auto-hide inputbar */
bool hide_statusbar; /**< Hide statusbar */
} global;
......@@ -142,6 +142,8 @@ struct girara_session_s
girara_list_t* shortcut_mappings;
girara_list_t* argument_mappings;
} config;
GiraraInputHistory* command_history; /**< Command history */
};
/**
......
......@@ -168,7 +168,7 @@ girara_split_path_array(const char* patharray)
girara_list_t* res = girara_list_new2(g_free);
char** paths = g_strsplit(patharray, ":", 0);
for (unsigned int i = 0; paths[i] != '\0'; ++i) {
for (size_t i = 0; paths[i] != NULL; ++i) {
girara_list_append(res, g_strdup(paths[i]));
}
g_strfreev(paths);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment