Переглянути джерело

codec: on 32-bit OS, using atomic functions requires 64-bit alignment

Updates #232
Ugorji Nwoke 7 роки тому
батько
коміт
0076dd9cb1
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      codec/helper_unsafe.go

+ 1 - 1
codec/helper_unsafe.go

@@ -176,8 +176,8 @@ func isEmptyValue(v reflect.Value, tinfos *TypeInfos, deref, checkStruct bool) b
 // --------------------------
 
 type atomicTypeInfoSlice struct { // expected to be 2 words
+	l int64          // length of the data array (must be first in struct, for 64-bit alignment necessary for 386)
 	v unsafe.Pointer // data array - Pointer (not uintptr) to maintain GC reference
-	l int64          // length of the data array
 }
 
 func (x *atomicTypeInfoSlice) load() []rtid2ti {