diff options
-rw-r--r-- | backend/epub/epub-document.c | 3 | ||||
-rw-r--r-- | libdocument/ev-backends-manager.c | 11 | ||||
-rw-r--r-- | libdocument/ev-backends-manager.h | 2 |
3 files changed, 4 insertions, 12 deletions
diff --git a/backend/epub/epub-document.c b/backend/epub/epub-document.c index ffdce89e..c8354d2d 100644 --- a/backend/epub/epub-document.c +++ b/backend/epub/epub-document.c @@ -1641,7 +1641,7 @@ static void epub_document_add_mathJax(gchar* containeruri,gchar* documentdir) { gchar *containerfilename= g_filename_from_uri(containeruri,NULL,NULL); - gchar *backenddir = ev_backends_manager_get_backends_dir(); + const gchar *backenddir = ev_backends_manager_get_backends_dir(); GString *mathjaxdir = g_string_new(backenddir); g_string_append_printf(mathjaxdir,"/epub/MathJax"); @@ -1675,7 +1675,6 @@ epub_document_add_mathJax(gchar* containeruri,gchar* documentdir) item = item->next; } xml_free_doc(); - g_free(backenddir); g_free(mathjaxref); g_free(containerfilename); g_free(nodedata); diff --git a/libdocument/ev-backends-manager.c b/libdocument/ev-backends-manager.c index 74fc09a0..6313b5ee 100644 --- a/libdocument/ev-backends-manager.c +++ b/libdocument/ev-backends-manager.c @@ -63,17 +63,10 @@ backends_dir (void) return backendsdir; } -gchar* +const gchar * ev_backends_manager_get_backends_dir(void) { - gchar *retval; - if (!backendsdir) { - retval = backends_dir(); - } - else { - retval = backendsdir; - } - return retval; + return backends_dir(); } static void diff --git a/libdocument/ev-backends-manager.h b/libdocument/ev-backends-manager.h index 1d660eac..3371a557 100644 --- a/libdocument/ev-backends-manager.h +++ b/libdocument/ev-backends-manager.h @@ -42,7 +42,7 @@ EvDocument *ev_backends_manager_get_document (const gchar *mime_typ const gchar *ev_backends_manager_get_document_module_name (EvDocument *document); EvTypeInfo *ev_backends_manager_get_document_type_info (EvDocument *document); GList *ev_backends_manager_get_all_types_info (void); -gchar *ev_backends_manager_get_backends_dir (void); +const gchar *ev_backends_manager_get_backends_dir (void); G_END_DECLS #endif /* EV_BACKENDS_MANAGER */ |