Skip to content

Commit 016daf9

Browse files
authored
Remove skiplist.pxd (#30269)
1 parent 1083472 commit 016daf9

File tree

3 files changed

+22
-27
lines changed

3 files changed

+22
-27
lines changed

pandas/_libs/skiplist.pxd

-24
This file was deleted.

pandas/_libs/window/aggregations.pyx

+21-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,27 @@ from pandas._libs.algos import is_monotonic
2222

2323
from pandas._libs.util cimport numeric
2424

25-
from pandas._libs.skiplist cimport (
26-
skiplist_t, skiplist_init, skiplist_destroy, skiplist_get, skiplist_insert,
27-
skiplist_remove)
25+
cdef extern from "../src/skiplist.h":
26+
ctypedef struct node_t:
27+
node_t **next
28+
int *width
29+
double value
30+
int is_nil
31+
int levels
32+
int ref_count
33+
34+
ctypedef struct skiplist_t:
35+
node_t *head
36+
node_t **tmp_chain
37+
int *tmp_steps
38+
int size
39+
int maxlevels
40+
41+
skiplist_t* skiplist_init(int) nogil
42+
void skiplist_destroy(skiplist_t*) nogil
43+
double skiplist_get(skiplist_t*, int, int*) nogil
44+
int skiplist_insert(skiplist_t*, double) nogil
45+
int skiplist_remove(skiplist_t*, double) nogil
2846

2947
cdef:
3048
float32_t MINfloat32 = np.NINF

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ def srcpath(name=None, suffix=".pyx", subdir="src"):
687687
"pyxfile": "_libs/window/aggregations",
688688
"language": "c++",
689689
"suffix": ".cpp",
690+
"depends": ["pandas/_libs/src/skiplist.h"],
690691
},
691692
"_libs.window.indexers": {"pyxfile": "_libs/window/indexers"},
692693
"_libs.writers": {"pyxfile": "_libs/writers"},

0 commit comments

Comments
 (0)