@@ -86,12 +86,12 @@ cdef class {{name}}Vector:
86
86
self.data.n = 0
87
87
self.data.m = _INIT_VEC_CAP
88
88
self.ao = np.empty(self.data.m, dtype={{idtype}})
89
- self.data.data = <{{arg}}*> self.ao.data
89
+ self.data.data = <{{arg}}*>self.ao.data
90
90
91
91
cdef resize(self):
92
92
self.data.m = max(self.data.m * 4, _INIT_VEC_CAP)
93
93
self.ao.resize(self.data.m, refcheck=False)
94
- self.data.data = <{{arg}}*> self.ao.data
94
+ self.data.data = <{{arg}}*>self.ao.data
95
95
96
96
def __dealloc__(self):
97
97
if self.data is not NULL:
@@ -140,7 +140,7 @@ cdef class StringVector:
140
140
self.external_view_exists = False
141
141
self.data.n = 0
142
142
self.data.m = _INIT_VEC_CAP
143
- self.data.data = <char **> malloc(self.data.m * sizeof(char *))
143
+ self.data.data = <char **>malloc(self.data.m * sizeof(char *))
144
144
if not self.data.data:
145
145
raise MemoryError()
146
146
@@ -153,7 +153,7 @@ cdef class StringVector:
153
153
self.data.m = max(self.data.m * 4, _INIT_VEC_CAP)
154
154
155
155
orig_data = self.data.data
156
- self.data.data = <char **> malloc(self.data.m * sizeof(char *))
156
+ self.data.data = <char **>malloc(self.data.m * sizeof(char *))
157
157
if not self.data.data:
158
158
raise MemoryError()
159
159
for i in range(m):
@@ -208,22 +208,22 @@ cdef class ObjectVector:
208
208
self.n = 0
209
209
self.m = _INIT_VEC_CAP
210
210
self.ao = np.empty(_INIT_VEC_CAP, dtype=object)
211
- self.data = <PyObject**> self.ao.data
211
+ self.data = <PyObject**>self.ao.data
212
212
213
213
def __len__(self):
214
214
return self.n
215
215
216
- cdef inline append(self, object o ):
216
+ cdef inline append(self, object obj ):
217
217
if self.n == self.m:
218
218
if self.external_view_exists:
219
219
raise ValueError("external reference but "
220
220
"Vector.resize() needed")
221
221
self.m = max(self.m * 2, _INIT_VEC_CAP)
222
222
self.ao.resize(self.m, refcheck=False)
223
- self.data = <PyObject**> self.ao.data
223
+ self.data = <PyObject**>self.ao.data
224
224
225
- Py_INCREF(o )
226
- self.data[self.n] = <PyObject*> o
225
+ Py_INCREF(obj )
226
+ self.data[self.n] = <PyObject*>obj
227
227
self.n += 1
228
228
229
229
def to_array(self):
@@ -768,7 +768,7 @@ cdef class StringHashTable(HashTable):
768
768
use_na_value = na_value is not None
769
769
770
770
# assign pointers and pre-filter out missing
771
- vecs = <const char **> malloc(n * sizeof(char *))
771
+ vecs = <const char **>malloc(n * sizeof(char *))
772
772
for i in range(n):
773
773
val = values[i]
774
774
@@ -844,9 +844,9 @@ cdef class PyObjectHashTable(HashTable):
844
844
845
845
def sizeof(self, deep=False):
846
846
""" return the size of my table in bytes """
847
- return self.table.n_buckets * (sizeof(PyObject *) + # keys
848
- sizeof(Py_ssize_t) + # vals
849
- sizeof(uint32_t)) # flags
847
+ return self.table.n_buckets * (sizeof(PyObject *) + # keys
848
+ sizeof(Py_ssize_t) + # vals
849
+ sizeof(uint32_t)) # flags
850
850
851
851
cpdef get_item(self, object val):
852
852
cdef khiter_t k
0 commit comments