From d9479e72a682af54db9a802b3085670de719a4a8 Mon Sep 17 00:00:00 2001 From: knu Date: Sun, 24 Feb 2002 08:20:50 +0000 Subject: Merge from rough. - Avoid namespace pollution. (MD5_* -> rb_Digest_MD5_*, etc.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/digest/sha1/sha1.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'ext/digest/sha1') diff --git a/ext/digest/sha1/sha1.h b/ext/digest/sha1/sha1.h index 22e06d29b8..2303cecc2b 100644 --- a/ext/digest/sha1/sha1.h +++ b/ext/digest/sha1/sha1.h @@ -1,5 +1,5 @@ /* $NetBSD: sha1.h,v 1.2 1998/05/29 22:55:44 thorpej Exp $ */ -/* $RoughId: sha1.h,v 1.2 2001/07/13 19:49:10 knu Exp $ */ +/* $RoughId: sha1.h,v 1.3 2002/02/24 08:14:32 knu Exp $ */ /* $Id$ */ /* @@ -19,6 +19,19 @@ typedef struct { uint8_t buffer[64]; } SHA1_CTX; +#ifdef RUBY +#define SHA1_Transform rb_Digest_SHA1_Transform +#define SHA1_Init rb_Digest_SHA1_Init +#define SHA1_Update rb_Digest_SHA1_Update +#define SHA1_Final rb_Digest_SHA1_Final +#define SHA1_Equal rb_Digest_SHA1_Equal +#ifndef _KERNEL +#define SHA1_End rb_Digest_SHA1_End +#define SHA1_File rb_Digest_SHA1_File +#define SHA1_Data rb_Digest_SHA1_Data +#endif /* _KERNEL */ +#endif + void SHA1_Transform _((uint32_t state[5], const uint8_t buffer[64])); void SHA1_Init _((SHA1_CTX *context)); void SHA1_Update _((SHA1_CTX *context, const uint8_t *data, size_t len)); -- cgit v1.2.3