Fix compilation with older versions of valac

This commit is contained in:
Marvin W 2018-12-28 15:20:00 +01:00
parent 1014b696f2
commit 49269c3173
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
2 changed files with 5 additions and 5 deletions

View file

@ -237,11 +237,11 @@ public int get_only_emoji_count(string markup_text) {
emoji_no--; emoji_no--;
} }
if (last_was_emoji && last_was_modifier_base && Unicode.has_binary_property(curchar, Unicode.EMOJI_MODIFIER)) { if (last_was_emoji && last_was_modifier_base && Unicode.has_binary_property(curchar, Unicode.Property.EMOJI_MODIFIER)) {
// still an emoji, but no longer a modifier base // still an emoji, but no longer a modifier base
last_was_modifier_base = false; last_was_modifier_base = false;
} else if (Unicode.has_binary_property(curchar, Unicode.EMOJI_PRESENTATION)) { } else if (Unicode.has_binary_property(curchar, Unicode.Property.EMOJI_PRESENTATION)) {
if (Unicode.has_binary_property(curchar, Unicode.EMOJI_MODIFIER_BASE)) { if (Unicode.has_binary_property(curchar, Unicode.Property.EMOJI_MODIFIER_BASE)) {
last_was_modifier_base = true; last_was_modifier_base = true;
} }
emoji_no++; emoji_no++;

View file

@ -1,6 +1,6 @@
namespace Unicode { namespace Unicode {
[CCode (cprefix = "UCHAR_", cheader_filename = "unicode/uchar.h")] [CCode (cprefix = "UCHAR_", cheader_filename = "unicode/uchar.h")]
enum Property { public enum Property {
EMOJI, EMOJI,
EMOJI_PRESENTATION, EMOJI_PRESENTATION,
EMOJI_MODIFIER, EMOJI_MODIFIER,
@ -8,5 +8,5 @@ namespace Unicode {
} }
[CCode (cname = "u_hasBinaryProperty", cheader_filename = "unicode/uchar.h")] [CCode (cname = "u_hasBinaryProperty", cheader_filename = "unicode/uchar.h")]
bool has_binary_property(unichar c, Property p); public bool has_binary_property(unichar c, Property p);
} }