Skip to content

Commit

Permalink
let Utf be an interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel59 committed Jun 6, 2014
1 parent 698bd0b commit 3444c14
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion unifill/Utf.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package unifill;

typedef Utf = {
interface Utf {

/**
The number of code units in `this`.
Expand Down
2 changes: 1 addition & 1 deletion unifill/Utf16.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package unifill;

class Utf16 {
class Utf16 implements Utf {

/**
Converts the code point `code` to a character as a Utf16 string.
Expand Down
4 changes: 2 additions & 2 deletions unifill/Utf32.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import python.internal.HxBuiltin;
/**
Utf32 provides a UTF-32-encoded string.
**/
class Utf32 {
class Utf32 implements Utf {

public static inline function fromCodePoint(codePoint : Int) : Utf32 {
return new Utf32(String.fromCharCode(codePoint));
Expand Down Expand Up @@ -154,7 +154,7 @@ class Utf32 {
/**
Utf32 provides a UTF-32-encoded string.
**/
class Utf32 {
class Utf32 implements Utf {

public static inline function fromCodePoint(codePoint : Int) : Utf32 {
return new Utf32([codePoint]);
Expand Down
2 changes: 1 addition & 1 deletion unifill/Utf8.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package unifill;
import haxe.io.Bytes;
import haxe.io.BytesBuffer;

class Utf8 {
class Utf8 implements Utf {

/**
Converts the code point `code` to a character as a Utf8 string.
Expand Down

0 comments on commit 3444c14

Please sign in to comment.