summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-06-08 17:16:19 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2019-06-10 11:37:00 +0100
commit178df697e3650972a70c8b812c7a1222eecaffb7 (patch)
treee672d7755930317934321068dd1d6cdc191acf61 /include
parent810cefd93fce0eaca7d1dc09d366145be5214e76 (diff)
downloadlibgit2-178df697e3650972a70c8b812c7a1222eecaffb7.tar.gz
trace: suffix the callbacks with `_cb`ethomson/callback_names
The trace logging callbacks should match the other callback naming conventions, using the `_cb` suffix instead of a `_callback` suffix.
Diffstat (limited to 'include')
-rw-r--r--include/git2/deprecated.h15
-rw-r--r--include/git2/trace.h4
2 files changed, 17 insertions, 2 deletions
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h
index 4c11b070a..177efa61a 100644
--- a/include/git2/deprecated.h
+++ b/include/git2/deprecated.h
@@ -14,6 +14,7 @@
#include "object.h"
#include "refs.h"
#include "remote.h"
+#include "trace.h"
/*
* Users can avoid deprecated functions by defining `GIT_DEPRECATE_HARD`.
@@ -261,6 +262,20 @@ typedef git_cred_ssh_interactive_cb git_cred_ssh_interactive_callback;
/**@}*/
+/** @name Deprecated Trace Callback Types
+ *
+ * These types are retained for backward compatibility. The newer
+ * versions of these values should be preferred in all new code.
+ *
+ * There is no plan to remove these backward compatibility values at
+ * this time.
+ */
+/**@{*/
+
+typedef git_trace_cb git_trace_callback;
+
+/**@}*/
+
/** @name Deprecated Transfer Progress Types
*
* These types are retained for backward compatibility. The newer
diff --git a/include/git2/trace.h b/include/git2/trace.h
index f8bbfb28c..8cee3a94e 100644
--- a/include/git2/trace.h
+++ b/include/git2/trace.h
@@ -49,7 +49,7 @@ typedef enum {
/**
* An instance for a tracing function
*/
-typedef void GIT_CALLBACK(git_trace_callback)(git_trace_level_t level, const char *msg);
+typedef void GIT_CALLBACK(git_trace_cb)(git_trace_level_t level, const char *msg);
/**
* Sets the system tracing configuration to the specified level with the
@@ -60,7 +60,7 @@ typedef void GIT_CALLBACK(git_trace_callback)(git_trace_level_t level, const cha
* @param cb Function to call with trace data
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_trace_set(git_trace_level_t level, git_trace_callback cb);
+GIT_EXTERN(int) git_trace_set(git_trace_level_t level, git_trace_cb cb);
/** @} */
GIT_END_DECL