]> Cypherpunks repositories - gostls13.git/commitdiff
hash/crc32: rename iEEETable to ieeeTable
authorJoe Tsai <joetsai@digital-static.net>
Fri, 20 Nov 2015 01:36:59 +0000 (17:36 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 20 Nov 2015 04:57:07 +0000 (04:57 +0000)
iEEETable violates the Go naming conventions and is inconsistent
with the rest of the package. Use ieeeTable instead.

Change-Id: I04b201aa39759d159de2b0295f43da80488c2263
Reviewed-on: https://go-review.googlesource.com/17068
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

src/hash/crc32/crc32.go
src/hash/crc32/crc32_amd64.go
src/hash/crc32/crc32_amd64p32.go
src/hash/crc32/crc32_generic.go

index d41755536ed951a859cb0bb0768d99e43ee6e05a..dc5994885f9d5fe9d585a4750bb6b47460eef68e 100644 (file)
@@ -57,9 +57,9 @@ var IEEETable = makeTable(IEEE)
 // slicing8Table is array of 8 Tables
 type slicing8Table [8]Table
 
-// iEEETable8 is the slicing8Table for IEEE
-var iEEETable8 *slicing8Table
-var iEEETable8Once sync.Once
+// ieeeTable8 is the slicing8Table for IEEE
+var ieeeTable8 *slicing8Table
+var ieeeTable8Once sync.Once
 
 // MakeTable returns a Table constructed from the specified polynomial.
 // The contents of this Table must not be modified.
index 13e483db850ae9f7abe5b22e3b1e4866af4ad8a5..01f86840d63e55810dcbabb40dd9cb744d9b0904 100644 (file)
@@ -44,10 +44,10 @@ func updateIEEE(crc uint32, p []byte) uint32 {
 
        // only use slicing-by-8 when input is >= 4KB
        if len(p) >= 4096 {
-               iEEETable8Once.Do(func() {
-                       iEEETable8 = makeTable8(IEEE)
+               ieeeTable8Once.Do(func() {
+                       ieeeTable8 = makeTable8(IEEE)
                })
-               return updateSlicingBy8(crc, iEEETable8, p)
+               return updateSlicingBy8(crc, ieeeTable8, p)
        }
 
        return update(crc, IEEETable, p)
index 40241c583537682e1a938f2362755d6fd0c11139..e6c2a523df3d79339958b4f805bc26225a6aad08 100644 (file)
@@ -27,10 +27,10 @@ func updateCastagnoli(crc uint32, p []byte) uint32 {
 func updateIEEE(crc uint32, p []byte) uint32 {
        // only use slicing-by-8 when input is >= 4KB
        if len(p) >= 4096 {
-               iEEETable8Once.Do(func() {
-                       iEEETable8 = makeTable8(IEEE)
+               ieeeTable8Once.Do(func() {
+                       ieeeTable8 = makeTable8(IEEE)
                })
-               return updateSlicingBy8(crc, iEEETable8, p)
+               return updateSlicingBy8(crc, ieeeTable8, p)
        }
 
        return update(crc, IEEETable, p)
index cd79062ce9807eccfe06e18847f49862f6a6feeb..8fc11a75db66643b4e59c0a3418733d8a8990057 100644 (file)
@@ -16,10 +16,10 @@ func updateCastagnoli(crc uint32, p []byte) uint32 {
 func updateIEEE(crc uint32, p []byte) uint32 {
        // only use slicing-by-8 when input is >= 4KB
        if len(p) >= 4096 {
-               iEEETable8Once.Do(func() {
-                       iEEETable8 = makeTable8(IEEE)
+               ieeeTable8Once.Do(func() {
+                       ieeeTable8 = makeTable8(IEEE)
                })
-               return updateSlicingBy8(crc, iEEETable8, p)
+               return updateSlicingBy8(crc, ieeeTable8, p)
        }
        return update(crc, IEEETable, p)
 }