@@ -55,6 +55,7 @@ static GitOdbBackend()
55
55
/// <param name="backend">[in] A pointer to the backend which is being asked to perform the task.</param>
56
56
/// <param name="oid">[in] The OID which the backend is being asked to look up.</param>
57
57
/// <returns>0 if successful; an error code otherwise.</returns>
58
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
58
59
public delegate int read_callback (
59
60
out IntPtr buffer_p ,
60
61
out UIntPtr len_p ,
@@ -77,6 +78,7 @@ public delegate int read_callback(
77
78
/// <param name="short_oid">[in] The short-form OID which the backend is being asked to look up.</param>
78
79
/// <param name="len">[in] The length of the short-form OID (short_oid).</param>
79
80
/// <returns>0 if successful; an error code otherwise.</returns>
81
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
80
82
public delegate int read_prefix_callback (
81
83
out GitOid out_oid ,
82
84
out IntPtr buffer_p ,
@@ -95,6 +97,7 @@ public delegate int read_prefix_callback(
95
97
/// <param name="backend">[in] A pointer to the backend which is being asked to perform the task.</param>
96
98
/// <param name="oid">[in] The OID which the backend is being asked to look up.</param>
97
99
/// <returns>0 if successful; an error code otherwise.</returns>
100
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
98
101
public delegate int read_header_callback (
99
102
out UIntPtr len_p ,
100
103
out GitObjectType type_p ,
@@ -111,6 +114,7 @@ public delegate int read_header_callback(
111
114
/// <param name="len">[in] The length of the buffer pointed to by data.</param>
112
115
/// <param name="type">[in] The type of the object.</param>
113
116
/// <returns>0 if successful; an error code otherwise.</returns>
117
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
114
118
public delegate int write_callback (
115
119
IntPtr backend ,
116
120
ref GitOid oid ,
@@ -128,6 +132,7 @@ public delegate int write_callback(
128
132
/// <param name="length">[in] The length of the object's contents.</param>
129
133
/// <param name="type">[in] The type of the object being written.</param>
130
134
/// <returns>0 if successful; an error code otherwise.</returns>
135
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
131
136
public delegate int writestream_callback (
132
137
out IntPtr stream_out ,
133
138
IntPtr backend ,
@@ -142,6 +147,7 @@ public delegate int writestream_callback(
142
147
/// <param name="backend">[in] A pointer to the backend which is being asked to perform the task.</param>
143
148
/// <param name="oid">[in] The object ID that the caller is requesting.</param>
144
149
/// <returns>0 if successful; an error code otherwise.</returns>
150
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
145
151
public delegate int readstream_callback (
146
152
out IntPtr stream_out ,
147
153
IntPtr backend ,
@@ -154,6 +160,7 @@ public delegate int readstream_callback(
154
160
/// <param name="backend">[in] A pointer to the backend which is being asked to perform the task.</param>
155
161
/// <param name="oid">[in] The object ID that the caller is requesting.</param>
156
162
/// <returns>True if the object exists; false otherwise</returns>
163
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
157
164
public delegate bool exists_callback (
158
165
IntPtr backend ,
159
166
ref GitOid oid ) ;
@@ -169,6 +176,7 @@ public delegate bool exists_callback(
169
176
/// <param name="short_oid">[in] The short-form OID which the backend is being asked to look up.</param>
170
177
/// <param name="len">[in] The length of the short-form OID (short_oid).</param>
171
178
/// <returns>1 if the object exists, 0 if the object doesn't; an error code otherwise.</returns>
179
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
172
180
public delegate int exists_prefix_callback (
173
181
ref GitOid found_oid ,
174
182
IntPtr backend ,
@@ -182,6 +190,7 @@ public delegate int exists_prefix_callback(
182
190
/// <param name="backend">[in] A pointer to the backend which is being asked to perform the task.</param>
183
191
/// <param name="cb">[in] The callback function to invoke.</param>
184
192
/// <param name="data">[in] An arbitrary parameter to pass through to the callback</param>
193
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
185
194
public delegate int foreach_callback (
186
195
IntPtr backend ,
187
196
foreach_callback_callback cb ,
@@ -191,6 +200,7 @@ public delegate int foreach_callback(
191
200
/// The owner of this backend is finished with it. The backend is asked to clean up and shut down.
192
201
/// </summary>
193
202
/// <param name="backend">[in] A pointer to the backend which is being freed.</param>
203
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
194
204
public delegate void free_callback (
195
205
IntPtr backend ) ;
196
206
@@ -200,6 +210,7 @@ public delegate void free_callback(
200
210
/// <param name="oid">The oid of each object in the backing store.</param>
201
211
/// <param name="data">The arbitrary parameter given to foreach_callback.</param>
202
212
/// <returns>A non-negative result indicates the enumeration should continue. Otherwise, the enumeration should stop.</returns>
213
+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
203
214
public delegate int foreach_callback_callback (
204
215
IntPtr oid ,
205
216
IntPtr data ) ;
0 commit comments