summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-06-17 16:38:21 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-06-26 20:43:45 +0200
commit4e913309b92138cdc6ff31fbce4e8afa2ab5458e (patch)
tree8f702228144d8877d8f3d064300c8fdd1491d7b3 /include/git2
parent0a9a38e539b02d254ec37ce6c18bdda2aedaafc8 (diff)
downloadlibgit2-4e913309b92138cdc6ff31fbce4e8afa2ab5458e.tar.gz
Move transports to an inheritance model
Rather than an 'private' pointer, make the private structures inherit from the generic git_transport struct. This way, we only have to worry about one memory allocation instead of two. The structures are so simple that this may even make the code use less memory overall. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/pkt.h1
-rw-r--r--include/git2/types.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/git2/pkt.h b/include/git2/pkt.h
index 59826da8a..0b17b3eed 100644
--- a/include/git2/pkt.h
+++ b/include/git2/pkt.h
@@ -52,4 +52,5 @@ struct 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);
void git_pkt_free(git_pkt *pkt);
diff --git a/include/git2/types.h b/include/git2/types.h
index ef80435c4..dae96cf22 100644
--- a/include/git2/types.h
+++ b/include/git2/types.h
@@ -177,7 +177,7 @@ typedef struct git_transport git_transport;
/** Whether to push or pull */
typedef enum git_net_direction git_net_direction;
-typedef int (*git_transport_cb)(git_transport *transport);
+typedef int (*git_transport_cb)(git_transport **transport);
typedef struct git_remote_head git_remote_head;
typedef struct git_headarray git_headarray;