Skip to content

Commit

Permalink
Allow string subtypes as H3str
Browse files Browse the repository at this point in the history
  • Loading branch information
jongbinjung committed Oct 5, 2024
1 parent 98bf22a commit ddbdfff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/h3/_cy/h3lib.pxd
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# cython: c_string_type=unicode, c_string_encoding=utf8
from cpython cimport bool
from libc.stdint cimport uint32_t, uint64_t, int64_t

ctypedef basestring H3str
ctypedef object H3str

cdef extern from 'h3api.h':
cdef int H3_VERSION_MAJOR
Expand Down
2 changes: 1 addition & 1 deletion src/h3/api/basic_int/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def str_to_int(h):
int
Unsigned 64-bit integer
"""
return _cy.str_to_int(str(h))
return _cy.str_to_int(h)


def int_to_str(x):
Expand Down

0 comments on commit ddbdfff

Please sign in to comment.