From 9591e91061a6d87b18e1523942edca500db7d720 Mon Sep 17 00:00:00 2001 From: Ryusei Yamaguchi Date: Mon, 22 Jun 2015 03:29:31 +0900 Subject: [PATCH] fix to work on Haxe 3.2.0 stable --- unifill/Utf16.hx | 6 +++--- unifill/Utf8.hx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/unifill/Utf16.hx b/unifill/Utf16.hx index 2cdc691..2acabdc 100644 --- a/unifill/Utf16.hx +++ b/unifill/Utf16.hx @@ -48,7 +48,7 @@ abstract Utf16 (StringU16) { `this`. **/ public function codePointAt(index : Int) : Int { - return Utf16Impl.decode_code_point(length, codeUnitAt, index); + return Utf16Impl.decode_code_point(length, function(i) return codeUnitAt(i), index); } /** @@ -87,7 +87,7 @@ abstract Utf16 (StringU16) { position `index` of `this`. **/ public inline function codePointWidthBefore(index : Int) : Int { - return Utf16Impl.find_prev_code_point(codeUnitAt, index); + return Utf16Impl.find_prev_code_point(function(i) return codeUnitAt(i), index); } /** @@ -117,7 +117,7 @@ abstract Utf16 (StringU16) { **/ public function validate() : Void { var len = this.length; - var accessor = codeUnitAt; + var accessor = function(i) return codeUnitAt(i); var i = 0; while (i < len) { Utf16Impl.decode_code_point(len, accessor, i); diff --git a/unifill/Utf8.hx b/unifill/Utf8.hx index f916c6a..ba67640 100644 --- a/unifill/Utf8.hx +++ b/unifill/Utf8.hx @@ -47,7 +47,7 @@ abstract Utf8(StringU8) { `this`. **/ public function codePointAt(index : Int) : Int { - return Utf8Impl.decode_code_point(length, codeUnitAt, index); + return Utf8Impl.decode_code_point(length, function(i) return codeUnitAt(i), index); } /** @@ -86,7 +86,7 @@ abstract Utf8(StringU8) { position `index` of `this`. **/ public inline function codePointWidthBefore(index : Int) : Int { - return Utf8Impl.find_prev_code_point(codeUnitAt, index); + return Utf8Impl.find_prev_code_point(function(i) return codeUnitAt(i), index); } /** @@ -116,7 +116,7 @@ abstract Utf8(StringU8) { **/ public function validate() : Void { var len = this.length; - var accessor = codeUnitAt; + var accessor = function(i) return codeUnitAt(i); var i = 0; while (i < len) { Utf8Impl.decode_code_point(len, accessor, i);