Commit a0f777c8 by Vicent Marti

opts: Add getters too

parent 586f71ef
...@@ -125,8 +125,10 @@ GIT_EXTERN(int) git_libgit2_capabilities(void); ...@@ -125,8 +125,10 @@ GIT_EXTERN(int) git_libgit2_capabilities(void);
enum { enum {
GIT_OPT_MWINDOW_SIZE, GIT_OPT_GET_MWINDOW_SIZE,
GIT_OPT_MWINDOW_MAPPED_LIMIT GIT_OPT_SET_MWINDOW_SIZE,
GIT_OPT_GET_MWINDOW_MAPPED_LIMIT,
GIT_OPT_SET_MWINDOW_MAPPED_LIMIT
}; };
/** /**
......
...@@ -45,13 +45,21 @@ void git_libgit2_opts(int key, ...) ...@@ -45,13 +45,21 @@ void git_libgit2_opts(int key, ...)
va_start(ap, key); va_start(ap, key);
switch(key) { switch(key) {
case GIT_OPT_MWINDOW_SIZE: case GIT_OPT_SET_MWINDOW_SIZE:
git_mwindow__window_size = va_arg(ap, size_t); git_mwindow__window_size = va_arg(ap, size_t);
break; break;
case GIT_OPT_MWINDOW_MAPPED_LIMIT: case GIT_OPT_GET_MWINDOW_SIZE:
*(va_arg(ap, size_t *)) = git_mwindow__window_size;
break;
case GIT_OPT_SET_MWINDOW_MAPPED_LIMIT:
git_mwindow__mapped_limit = va_arg(ap, size_t); git_mwindow__mapped_limit = va_arg(ap, size_t);
break; break;
case GIT_OPT_GET_MWINDOW_MAPPED_LIMIT:
*(va_arg(ap, size_t *)) = git_mwindow__mapped_limit;
break;
} }
va_end(ap); va_end(ap);
......
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