Skip to content

Removed compat_helper.h #29693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions pandas/_libs/internals.pyx
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import cython
from cython import Py_ssize_t

from cpython.object cimport PyObject
from cpython.slice cimport PySlice_GetIndicesEx

cdef extern from "Python.h":
Py_ssize_t PY_SSIZE_T_MAX

import numpy as np
from numpy cimport int64_t

cdef extern from "compat_helper.h":
cdef int slice_get_indices(PyObject* s, Py_ssize_t length,
Py_ssize_t *start, Py_ssize_t *stop,
Py_ssize_t *step,
Py_ssize_t *slicelength) except -1


from pandas._libs.algos import ensure_int64


Expand Down Expand Up @@ -258,8 +251,8 @@ cpdef Py_ssize_t slice_len(
if slc is None:
raise TypeError("slc must be slice")

slice_get_indices(<PyObject *>slc, objlen,
&start, &stop, &step, &length)
PySlice_GetIndicesEx(slc, objlen,
&start, &stop, &step, &length)

return length

Expand All @@ -278,8 +271,8 @@ cdef slice_get_indices_ex(slice slc, Py_ssize_t objlen=PY_SSIZE_T_MAX):
if slc is None:
raise TypeError("slc should be a slice")

slice_get_indices(<PyObject *>slc, objlen,
&start, &stop, &step, &length)
PySlice_GetIndicesEx(slc, objlen,
&start, &stop, &step, &length)

return start, stop, step, length

Expand Down
45 changes: 0 additions & 45 deletions pandas/_libs/src/compat_helper.h

This file was deleted.

9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,7 @@ def is_platform_mac():


_pxi_dep_template = {
"algos": [
"_libs/algos_common_helper.pxi.in",
"_libs/algos_take_helper.pxi.in",
],
"algos": ["_libs/algos_common_helper.pxi.in", "_libs/algos_take_helper.pxi.in"],
"hashtable": [
"_libs/hashtable_class_helper.pxi.in",
"_libs/hashtable_func_helper.pxi.in",
Expand Down Expand Up @@ -544,7 +541,7 @@ def srcpath(name=None, suffix=".pyx", subdir="src"):
ts_include = ["pandas/_libs/tslibs/src", "pandas/_libs/tslibs"]


lib_depends = ["pandas/_libs/src/parse_helper.h", "pandas/_libs/src/compat_helper.h"]
lib_depends = ["pandas/_libs/src/parse_helper.h"]

np_datetime_headers = [
"pandas/_libs/tslibs/src/datetime/np_datetime.h",
Expand Down Expand Up @@ -823,5 +820,5 @@ def srcpath(name=None, suffix=".pyx", subdir="src"):
entry_points={
"pandas_plotting_backends": ["matplotlib = pandas:plotting._matplotlib"]
},
**setuptools_kwargs
**setuptools_kwargs,
)