Skip to content

Commit 23f2d34

Browse files
committed
stdlib: make the FloatingPoint GYB Python3 friendly
1 parent 2127cbf commit 23f2d34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/public/core/FloatingPointTypes.swift.gyb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import SwiftShims
1414

1515
%{
16+
from __future__ import division
1617
from SwiftIntTypes import all_integer_types
1718
from SwiftFloatingPointTypes import all_floating_point_types
1819

@@ -981,7 +982,7 @@ extension ${Self}: Hashable {
981982
%elif bits == 64:
982983
return Hasher._hash(seed: seed, v.bitPattern)
983984
%elif bits < 64:
984-
return Hasher._hash(seed: seed, bytes: UInt64(v.bitPattern), count: ${bits/8})
985+
return Hasher._hash(seed: seed, bytes: UInt64(v.bitPattern), count: ${bits//8})
985986
%else:
986987
#error("Unimplemented")
987988
%end

0 commit comments

Comments
 (0)