aboutsummaryrefslogtreecommitdiff
path: root/src/lib/hash
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-04-15 20:27:45 -0700
committerRuss Cox <rsc@golang.org>2009-04-15 20:27:45 -0700
commit60ce95d7a1677d98ca098a3657e00d71b6021a30 (patch)
tree16cfcc3cc7d82aa01da1b152e520297da5afc88a /src/lib/hash
parent65d397f747f565cbea57dd40f4f838bbab803243 (diff)
downloadgo-60ce95d7a1677d98ca098a3657e00d71b6021a30.tar.xz
code changes for array conversion.
as a reminder, the old conversion was that you could write var arr [10]byte; var slice []byte; slice = arr; but now you have to write slice = &arr; the change eliminates an implicit &, so that the only implicit &s left are in the . operator and in string(arr). also, removed utf8.EncodeRuneToString in favor of string(rune). R=r DELTA=83 (1 added, 23 deleted, 59 changed) OCL=27531 CL=27534
Diffstat (limited to 'src/lib/hash')
-rw-r--r--src/lib/hash/md5.go2
-rw-r--r--src/lib/hash/sha1.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/hash/md5.go b/src/lib/hash/md5.go
index ab3201ffb8..d9fc6157dc 100644
--- a/src/lib/hash/md5.go
+++ b/src/lib/hash/md5.go
@@ -51,7 +51,7 @@ func (d *Digest) Write(p []byte) (nn int, err *os.Error) {
}
d.nx += n;
if d.nx == _Chunk {
- _Block(d, d.x);
+ _Block(d, &d.x);
d.nx = 0;
}
p = p[n:len(p)];
diff --git a/src/lib/hash/sha1.go b/src/lib/hash/sha1.go
index 0bf284ef1a..788eda860e 100644
--- a/src/lib/hash/sha1.go
+++ b/src/lib/hash/sha1.go
@@ -53,7 +53,7 @@ func (d *Digest) Write(p []byte) (nn int, err *os.Error) {
}
d.nx += n;
if d.nx == _Chunk {
- _Block(d, d.x);
+ _Block(d, &d.x);
d.nx = 0;
}
p = p[n:len(p)];