diff options
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index da5779f..b84f8bc 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -948,10 +948,9 @@ class Config(object): tokens = self._tokenize(line, False, filename, linenr) - if tokens.is_empty(): - continue - t0 = tokens.get_next() + if t0 is None: + continue # Cases are ordered roughly by frequency, which speeds things up a # bit @@ -1146,10 +1145,9 @@ class Config(object): tokens = self._tokenize(line, False, filename, linenr) - if tokens.is_empty(): - continue - t0 = tokens.get_next() + if t0 is None: + continue # Cases are ordered roughly by frequency, which speeds things up a # bit @@ -3537,9 +3535,6 @@ class _Feed(object): def __len__(self): return len(self.items) - def is_empty(self): - return self.items == [] - def check(self, token): """Check if the next token is 'token'. If so, remove it from the token feed and return True. Otherwise, leave it in and return False.""" |
