summaryrefslogtreecommitdiff
path: root/src/mwindow.h
diff options
context:
space:
mode:
authorCarlos Martin Nieto <cmn@elego.de>2012-06-28 12:05:49 +0200
committerCarlos Martin Nieto <cmn@elego.de>2012-06-28 12:10:33 +0200
commit1d8943c640bad4425b8578aae6f680fa8e513bc7 (patch)
tree1449d930980d07f5c7a1c12d1f9b0c63b41ba4ab /src/mwindow.h
parent1de44c24936ecf39915913ddf26f68f78c7963d3 (diff)
downloadlibgit2-1d8943c640bad4425b8578aae6f680fa8e513bc7.tar.gz
mwindow: allow memory-window files to deregister
Once a file is registered, there is no way to deregister it, even after the structure that contains it is no longer needed and has been freed. This may be the source of #624. Allow and use the deregister function to remove our file from the global list.
Diffstat (limited to 'src/mwindow.h')
-rw-r--r--src/mwindow.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mwindow.h b/src/mwindow.h
index 058027251..d4fd19569 100644
--- a/src/mwindow.h
+++ b/src/mwindow.h
@@ -40,6 +40,7 @@ void git_mwindow_free_all(git_mwindow_file *mwf);
unsigned char *git_mwindow_open(git_mwindow_file *mwf, git_mwindow **cursor, git_off_t offset, size_t extra, unsigned int *left);
void git_mwindow_scan_lru(git_mwindow_file *mwf, git_mwindow **lru_w, git_mwindow **lru_l);
int git_mwindow_file_register(git_mwindow_file *mwf);
+int git_mwindow_file_deregister(git_mwindow_file *mwf);
void git_mwindow_close(git_mwindow **w_cursor);
#endif