2
0
Эх сурвалжийг харах

improve fastCodeAt for python

frabbit 11 жил өмнө
parent
commit
176ee6045e
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      std/StringTools.hx

+ 1 - 1
std/StringTools.hx

@@ -377,7 +377,7 @@ class StringTools {
 		return (untyped s).charCodeAt(index);
 			#end
 		#elseif python
-		return if (index >= s.length) -1 else untyped(ord(untyped s[index]));
+		return if (index >= s.length) -1 else python.lib.Builtin.ord(python.Syntax.arrayAccess(s, index));
 		#else
 		return s.cca(index);
 		#end