* Fix Lexeme.check_flag

This commit is contained in:
Matthew Honnibal 2015-09-10 14:51:05 +02:00
parent b9e31dc245
commit c3f773cd63
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,8 @@ cdef class Lexeme:
@staticmethod @staticmethod
cdef inline bint check_flag(const LexemeC* lexeme, attr_id_t flag_id) nogil: cdef inline bint check_flag(const LexemeC* lexeme, attr_id_t flag_id) nogil:
return lexeme.flags & (1 << flag_id) cdef flags_t one = 1
return lexeme.flags & (one << flag_id)
@staticmethod @staticmethod
cdef inline bint set_flag(LexemeC* lex, attr_id_t flag_id, int value) nogil: cdef inline bint set_flag(LexemeC* lex, attr_id_t flag_id, int value) nogil: