File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -677,20 +677,8 @@ def all_lengths(self) -> Iterator[str]:
677677 yield length
678678
679679 def patterns (self ) -> Iterator [Tuple [str , bool ]]:
680- if not self .cdata_parsed or self .cdata .basetype != self .STRING :
681- return
682- if self .cdata_parsed .patterns == ffi .NULL :
683- return
684- for p in ly_array_iter (self .cdata_parsed .patterns ):
685- if not p :
686- continue
687- # in case of pattern restriction, the first byte has a special meaning:
688- # 0x06 (ACK) for regular match and 0x15 (NACK) for invert-match
689- invert_match = p .arg .str [0 ] == b"\x15 "
690- # yield tuples like:
691- # ('[a-zA-Z_][a-zA-Z0-9\-_.]*', False)
692- # ('[xX][mM][lL].*', True)
693- yield c2str (p .arg .str + 1 ), invert_match
680+ for pattern in self .pattern_details ():
681+ yield pattern .expression (), pattern .inverted ()
694682
695683 def all_patterns (self ) -> Iterator [Tuple [str , bool ]]:
696684 if self .cdata .basetype == lib .LY_TYPE_UNION :
You can’t perform that action at this time.
0 commit comments