From c3f773cd63fec194193e52d1d13cf764aee74a89 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 10 Sep 2015 14:51:05 +0200 Subject: [PATCH] * Fix Lexeme.check_flag --- spacy/lexeme.pxd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/lexeme.pxd b/spacy/lexeme.pxd index 63280155c..75cac871c 100644 --- a/spacy/lexeme.pxd +++ b/spacy/lexeme.pxd @@ -72,7 +72,8 @@ cdef class Lexeme: @staticmethod 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 cdef inline bint set_flag(LexemeC* lex, attr_id_t flag_id, int value) nogil: