Allow compilation as C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index ea6e219..c36e2a4 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -187,7 +187,7 @@ typedef struct git_checkout_opts {
} git_checkout_opts;
#define GIT_CHECKOUT_OPTS_VERSION 1
-#define GIT_CHECKOUT_OPTS_INIT {GIT_CHECKOUT_OPTS_VERSION, 0}
+#define GIT_CHECKOUT_OPTS_INIT {GIT_CHECKOUT_OPTS_VERSION}
/**
* Updates files in the index and the working tree to match the content of the
diff --git a/include/git2/config.h b/include/git2/config.h
index 4855bab..b186e70 100644
--- a/include/git2/config.h
+++ b/include/git2/config.h
@@ -64,7 +64,7 @@ struct git_config_backend {
void (*free)(struct git_config_backend *);
};
#define GIT_CONFIG_BACKEND_VERSION 1
-#define GIT_CONFIG_BACKEND_INIT {GIT_CONFIG_BACKEND_VERSION, 0}
+#define GIT_CONFIG_BACKEND_INIT {GIT_CONFIG_BACKEND_VERSION}
typedef enum {
GIT_CVAR_FALSE = 0,
diff --git a/include/git2/diff.h b/include/git2/diff.h
index f325342..49f781d 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -153,7 +153,7 @@ typedef struct {
} git_diff_options;
#define GIT_DIFF_OPTIONS_VERSION 1
-#define GIT_DIFF_OPTIONS_INIT {GIT_DIFF_OPTIONS_VERSION, 0}
+#define GIT_DIFF_OPTIONS_INIT {GIT_DIFF_OPTIONS_VERSION}
/**
* The diff list object that contains all individual file deltas.
@@ -366,7 +366,7 @@ typedef struct {
} git_diff_find_options;
#define GIT_DIFF_FIND_OPTIONS_VERSION 1
-#define GIT_DIFF_FIND_OPTIONS_INIT {GIT_DIFF_FIND_OPTIONS_VERSION, 0}
+#define GIT_DIFF_FIND_OPTIONS_INIT {GIT_DIFF_FIND_OPTIONS_VERSION}
/** @name Diff List Generator Functions
*
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h
index 3963ae5..19a1540 100644
--- a/include/git2/odb_backend.h
+++ b/include/git2/odb_backend.h
@@ -100,7 +100,7 @@ struct git_odb_backend {
};
#define GIT_ODB_BACKEND_VERSION 1
-#define GIT_ODB_BACKEND_INIT {GIT_ODB_BACKEND_VERSION, 0}
+#define GIT_ODB_BACKEND_INIT {GIT_ODB_BACKEND_VERSION}
/** Streaming mode */
enum {
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 75e2a59..af73ca8 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -355,7 +355,7 @@ struct git_remote_callbacks {
};
#define GIT_REMOTE_CALLBACKS_VERSION 1
-#define GIT_REMOTE_CALLBACKS_INIT {GIT_REMOTE_CALLBACKS_VERSION, 0}
+#define GIT_REMOTE_CALLBACKS_INIT {GIT_REMOTE_CALLBACKS_VERSION}
/**
* Set the callbacks for a remote
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 0d82b98..216f59b 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -250,7 +250,7 @@ typedef struct {
} git_repository_init_options;
#define GIT_REPOSITORY_INIT_OPTIONS_VERSION 1
-#define GIT_REPOSITORY_INIT_OPTIONS_INIT {GIT_REPOSITORY_INIT_OPTIONS_VERSION, 0}
+#define GIT_REPOSITORY_INIT_OPTIONS_INIT {GIT_REPOSITORY_INIT_OPTIONS_VERSION}
/**
* Create a new Git repository in the given folder with extended controls.
diff --git a/include/git2/status.h b/include/git2/status.h
index 1211f1d..a898d1f 100644
--- a/include/git2/status.h
+++ b/include/git2/status.h
@@ -165,7 +165,7 @@ typedef struct {
} git_status_options;
#define GIT_STATUS_OPTIONS_VERSION 1
-#define GIT_STATUS_OPTIONS_INIT {GIT_STATUS_OPTIONS_VERSION, 0}
+#define GIT_STATUS_OPTIONS_INIT {GIT_STATUS_OPTIONS_VERSION}
/**
* Gather file status information and run callbacks as requested.
diff --git a/include/git2/transport.h b/include/git2/transport.h
index 60ac3f2..00beb44 100644
--- a/include/git2/transport.h
+++ b/include/git2/transport.h
@@ -142,7 +142,7 @@ typedef struct git_transport {
} git_transport;
#define GIT_TRANSPORT_VERSION 1
-#define GIT_TRANSPORT_INIT {GIT_TRANSPORT_VERSION, 0}
+#define GIT_TRANSPORT_INIT {GIT_TRANSPORT_VERSION}
/**
* Function to use to create a transport from a URL. The transport database