Merge pull request #315 from belkiss/development Finish to hide git_pkt from external API.
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
diff --git a/include/git2/types.h b/include/git2/types.h
index 256393e..9d14c3e 100644
--- a/include/git2/types.h
+++ b/include/git2/types.h
@@ -185,12 +185,6 @@ typedef int (*git_transport_cb)(git_transport **transport);
typedef struct git_remote_head git_remote_head;
typedef struct git_headarray git_headarray;
-/* Several types of packets */
-typedef enum git_pkt_type git_pkt_type;
-typedef struct git_pkt git_pkt;
-typedef struct git_pkt_cmd git_pkt_cmd;
-typedef struct git_pkt_ref git_pkt_ref;
-
/** @} */
GIT_END_DECL
diff --git a/src/pkt.h b/src/pkt.h
index 28cad7c..6dc5486 100644
--- a/src/pkt.h
+++ b/src/pkt.h
@@ -37,9 +37,9 @@ enum git_pkt_type {
};
/* This would be a flush pkt */
-struct git_pkt {
+typedef struct {
enum git_pkt_type type;
-};
+} git_pkt;
struct git_pkt_cmd {
enum git_pkt_type type;
@@ -49,11 +49,11 @@ struct git_pkt_cmd {
};
/* This is a pkt-line with some info in it */
-struct git_pkt_ref {
+typedef struct {
enum git_pkt_type type;
git_remote_head head;
char *capabilities;
-};
+} git_pkt_ref;
int git_pkt_parse_line(git_pkt **head, const char *line, const char **out, size_t len);
int git_pkt_send_flush(int s);