mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-05 10:37:05 +00:00
Add typedefs on some public enums
Apparently this makes things easier to bind in some languages.
This commit is contained in:
parent
5e57cfa1b3
commit
0f1f9833cf
@ -103,10 +103,10 @@ GIT_EXTERN(void) git_libgit2_version(int *major, int *minor, int *rev);
|
|||||||
/**
|
/**
|
||||||
* Combinations of these values describe the capabilities of libgit2.
|
* Combinations of these values describe the capabilities of libgit2.
|
||||||
*/
|
*/
|
||||||
enum {
|
typedef enum {
|
||||||
GIT_CAP_THREADS = ( 1 << 0 ),
|
GIT_CAP_THREADS = ( 1 << 0 ),
|
||||||
GIT_CAP_HTTPS = ( 1 << 1 )
|
GIT_CAP_HTTPS = ( 1 << 1 )
|
||||||
};
|
} git_cap_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query compile time options for libgit2.
|
* Query compile time options for libgit2.
|
||||||
@ -114,12 +114,13 @@ enum {
|
|||||||
* @return A combination of GIT_CAP_* values.
|
* @return A combination of GIT_CAP_* values.
|
||||||
*
|
*
|
||||||
* - GIT_CAP_THREADS
|
* - GIT_CAP_THREADS
|
||||||
* Libgit2 was compiled with thread support. Note that thread support is still to be seen as a
|
* Libgit2 was compiled with thread support. Note that thread support is
|
||||||
* 'work in progress'.
|
* still to be seen as a 'work in progress' - basic object lookups are
|
||||||
|
* believed to be threadsafe, but other operations may not be.
|
||||||
*
|
*
|
||||||
* - GIT_CAP_HTTPS
|
* - GIT_CAP_HTTPS
|
||||||
* Libgit2 supports the https:// protocol. This requires the open ssl library to be
|
* Libgit2 supports the https:// protocol. This requires the openssl
|
||||||
* found when compiling libgit2.
|
* library to be found when compiling libgit2.
|
||||||
*/
|
*/
|
||||||
GIT_EXTERN(int) git_libgit2_capabilities(void);
|
GIT_EXTERN(int) git_libgit2_capabilities(void);
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
GIT_BEGIN_DECL
|
GIT_BEGIN_DECL
|
||||||
|
|
||||||
/** Generic return codes */
|
/** Generic return codes */
|
||||||
enum {
|
typedef enum {
|
||||||
GIT_OK = 0,
|
GIT_OK = 0,
|
||||||
GIT_ERROR = -1,
|
GIT_ERROR = -1,
|
||||||
GIT_ENOTFOUND = -3,
|
GIT_ENOTFOUND = -3,
|
||||||
@ -35,7 +35,7 @@ enum {
|
|||||||
|
|
||||||
GIT_PASSTHROUGH = -30,
|
GIT_PASSTHROUGH = -30,
|
||||||
GIT_ITEROVER = -31,
|
GIT_ITEROVER = -31,
|
||||||
};
|
} git_error_code;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *message;
|
char *message;
|
||||||
|
@ -59,11 +59,11 @@ GIT_EXTERN(int) git_odb_backend_loose(git_odb_backend **out, const char *objects
|
|||||||
GIT_EXTERN(int) git_odb_backend_one_pack(git_odb_backend **out, const char *index_file);
|
GIT_EXTERN(int) git_odb_backend_one_pack(git_odb_backend **out, const char *index_file);
|
||||||
|
|
||||||
/** Streaming mode */
|
/** Streaming mode */
|
||||||
enum {
|
typedef enum {
|
||||||
GIT_STREAM_RDONLY = (1 << 1),
|
GIT_STREAM_RDONLY = (1 << 1),
|
||||||
GIT_STREAM_WRONLY = (1 << 2),
|
GIT_STREAM_WRONLY = (1 << 2),
|
||||||
GIT_STREAM_RW = (GIT_STREAM_RDONLY | GIT_STREAM_WRONLY),
|
GIT_STREAM_RW = (GIT_STREAM_RDONLY | GIT_STREAM_WRONLY),
|
||||||
};
|
} git_odb_stream_t;
|
||||||
|
|
||||||
/** A stream to read/write from a backend */
|
/** A stream to read/write from a backend */
|
||||||
struct git_odb_stream {
|
struct git_odb_stream {
|
||||||
|
Loading…
Reference in New Issue
Block a user