summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2010-06-05 21:09:03 +0100
committerRamsay Jones <ramsay@ramsay1.demon.co.uk>2010-06-07 19:45:32 +0100
commit4386ee2acbcbbf1fdf06c75b91da3a9653075c6f (patch)
tree948171a894ff8a25635232606c5afa7bc3224e38 /src
parentd03f567593f346a1ca96a57f8191def098d126e3 (diff)
downloadlibgit2-4386ee2acbcbbf1fdf06c75b91da3a9653075c6f.tar.gz
Add a 'git__' prefix to the block-sha1 functions
This reduces the global namespace pollution. These functions were the only remaining external symbols (with the exception of an PPC_SHA1 build) which did not start with 'git', and since these are private library symbols the 'git__' prefix is appropriate. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/block-sha1/sha1.c10
-rw-r--r--src/block-sha1/sha1.h12
2 files changed, 11 insertions, 11 deletions
diff --git a/src/block-sha1/sha1.c b/src/block-sha1/sha1.c
index e3409fb59..8c1460102 100644
--- a/src/block-sha1/sha1.c
+++ b/src/block-sha1/sha1.c
@@ -221,7 +221,7 @@ static void blk_SHA1_Block(blk_SHA_CTX *ctx, const unsigned int *data)
ctx->H[4] += E;
}
-void blk_SHA1_Init(blk_SHA_CTX *ctx)
+void git__blk_SHA1_Init(blk_SHA_CTX *ctx)
{
ctx->size = 0;
@@ -233,7 +233,7 @@ void blk_SHA1_Init(blk_SHA_CTX *ctx)
ctx->H[4] = 0xc3d2e1f0;
}
-void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, unsigned long len)
+void git__blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, unsigned long len)
{
unsigned int lenW = ctx->size & 63;
@@ -261,7 +261,7 @@ void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, unsigned long len)
memcpy(ctx->W, data, len);
}
-void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx)
+void git__blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx)
{
static const unsigned char pad[64] = { 0x80 };
unsigned int padlen[2];
@@ -272,8 +272,8 @@ void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx)
padlen[1] = htonl((uint32_t)(ctx->size << 3));
i = ctx->size & 63;
- blk_SHA1_Update(ctx, pad, 1+ (63 & (55 - i)));
- blk_SHA1_Update(ctx, padlen, 8);
+ git__blk_SHA1_Update(ctx, pad, 1+ (63 & (55 - i)));
+ git__blk_SHA1_Update(ctx, padlen, 8);
/* Output hash */
for (i = 0; i < 5; i++)
diff --git a/src/block-sha1/sha1.h b/src/block-sha1/sha1.h
index bb2bad2a2..558d6aece 100644
--- a/src/block-sha1/sha1.h
+++ b/src/block-sha1/sha1.h
@@ -12,11 +12,11 @@ typedef struct {
unsigned int W[16];
} blk_SHA_CTX;
-void blk_SHA1_Init(blk_SHA_CTX *ctx);
-void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *dataIn, unsigned long len);
-void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx);
+void git__blk_SHA1_Init(blk_SHA_CTX *ctx);
+void git__blk_SHA1_Update(blk_SHA_CTX *ctx, const void *dataIn, unsigned long len);
+void git__blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx);
#define SHA_CTX blk_SHA_CTX
-#define SHA1_Init blk_SHA1_Init
-#define SHA1_Update blk_SHA1_Update
-#define SHA1_Final blk_SHA1_Final
+#define SHA1_Init git__blk_SHA1_Init
+#define SHA1_Update git__blk_SHA1_Update
+#define SHA1_Final git__blk_SHA1_Final