Skip to content

Commit

Permalink
adjust create signature again
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-b-miller committed Jun 3, 2024
1 parent bd94911 commit cef5d27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/cudf/cudf/_lib/pylibcudf/strings/regex_program.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ cdef class RegexProgram:
raise ValueError("Do not instantiate RegexProgram directly, use create")

@staticmethod
def create(str pattern, regex_flags flags):
def create(str pattern, int flags):
cdef unique_ptr[regex_program] c_prog
cdef regex_flags c_flags
cdef string c_pattern = pattern.encode()

cdef RegexProgram ret = RegexProgram.__new__(RegexProgram)
if isinstance(flags, object):
if isinstance(flags, (int, RegexFlags)):
c_flags = flags
c_flags = <regex_flags>flags
with nogil:
c_prog = regex_program.create(c_pattern, c_flags)

Expand Down

0 comments on commit cef5d27

Please sign in to comment.