Skip to content

Commit

Permalink
BLD/CI fix deprecated unicode lenght check pandas-dev#36296
Browse files Browse the repository at this point in the history
  • Loading branch information
fangchenli committed Sep 16, 2020
1 parent c774f3d commit 3c4633e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/_libs/writers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import cython
from cython import Py_ssize_t

from cpython.bytes cimport PyBytes_GET_SIZE
from cpython.unicode cimport PyUnicode_GET_SIZE
from cpython.unicode cimport PyUnicode_GET_LENGTH

import numpy as np

Expand Down Expand Up @@ -144,7 +144,7 @@ cpdef inline Py_ssize_t word_len(object val):
Py_ssize_t l = 0

if isinstance(val, str):
l = PyUnicode_GET_SIZE(val)
l = PyUnicode_GET_LENGTH(val)
elif isinstance(val, bytes):
l = PyBytes_GET_SIZE(val)

Expand Down

0 comments on commit 3c4633e

Please sign in to comment.