elm_code line: move freeing to the line file
This commit is contained in:
parent
ed521af168
commit
e951c13e91
|
@ -136,9 +136,7 @@ EAPI void elm_code_file_free(Elm_Code_File *file)
|
|||
|
||||
EINA_LIST_FREE(file->lines, l)
|
||||
{
|
||||
if (l->modified)
|
||||
free(l->modified);
|
||||
free(l);
|
||||
elm_code_line_free(l);
|
||||
}
|
||||
|
||||
if (file->file)
|
||||
|
@ -172,10 +170,7 @@ EAPI void elm_code_file_clear(Elm_Code_File *file)
|
|||
|
||||
EINA_LIST_FREE(file->lines, l)
|
||||
{
|
||||
if (l->modified)
|
||||
free(l->modified);
|
||||
|
||||
free(l);
|
||||
elm_code_line_free(l);
|
||||
}
|
||||
|
||||
if (file->parent)
|
||||
|
|
|
@ -6,6 +6,18 @@
|
|||
|
||||
#include "elm_code_private.h"
|
||||
|
||||
EAPI void
|
||||
elm_code_line_free(Elm_Code_Line *line)
|
||||
{
|
||||
if (!line)
|
||||
return;
|
||||
|
||||
if (line->modified)
|
||||
free(line->modified);
|
||||
|
||||
free(line);
|
||||
}
|
||||
|
||||
EAPI unsigned int
|
||||
elm_code_line_utf8_length_get(Elm_Code_Line *line)
|
||||
{
|
||||
|
|
|
@ -34,6 +34,8 @@ typedef struct _Elm_Code_Line
|
|||
void *data;
|
||||
} Elm_Code_Line;
|
||||
|
||||
EAPI void elm_code_line_free(Elm_Code_Line *line);
|
||||
|
||||
EAPI unsigned int elm_code_line_utf8_length_get(Elm_Code_Line *line);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue