Skip to content

Commit

Permalink
Removes sketch file
Browse files Browse the repository at this point in the history
  • Loading branch information
chaburkland committed Jun 15, 2024
1 parent 176ddec commit 82d11d1
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 99 deletions.
2 changes: 1 addition & 1 deletion performance/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ def __init__(self):
self.string = ''.join(['abcd,'] * 1000)

def main(self):
post = self.entry(self.string, ',', 20)
post = self.entry(self.string, delimiter=',', count=20)

class SplitAfterCountAK(SplitAfterCount):
entry = staticmethod(split_after_count_ak)
Expand Down
27 changes: 0 additions & 27 deletions script.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/array_go.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ PyDoc_STRVAR(ArrayGO_values_doc, "Return the immutable labels array\n");
//------------------------------------------------------------------------------
// ArrayGO utility functions

static inline int
static int
update_array_cache(ArrayGOObject *self)
{
if (self->list) {
Expand Down
12 changes: 6 additions & 6 deletions src/block_index.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
PyObject * ErrorInitTypeBlocks;

// Returns NULL on error. Returns a new reference. Note that a reference is stolen from the PyObject argument.
static inline PyObject *
static PyObject *
AK_build_pair_ssize_t_pyo(Py_ssize_t a, PyObject* py_b)
{
if (py_b == NULL) { // construction failed
Expand All @@ -34,7 +34,7 @@ AK_build_pair_ssize_t_pyo(Py_ssize_t a, PyObject* py_b)
}

// Given inclusive start, end indices, returns a new reference to a slice. Returns NULL on error. If `reduce` is True, single width slices return an integer.
static inline PyObject *
static PyObject *
AK_build_slice_inclusive(Py_ssize_t start, Py_ssize_t end, bool reduce)
{
if (reduce && start == end) {
Expand Down Expand Up @@ -67,7 +67,7 @@ typedef struct BlockIndexObject {
} BlockIndexObject;

// Returns a new reference to tuple. Returns NULL on error. Python already wraps negative numbers up to negative length when used in the sequence slot
static inline PyObject *
static PyObject *
AK_BI_item(BlockIndexObject* self, Py_ssize_t i) {
if (!((size_t)i < (size_t)self->bir_count)) {
PyErr_SetString(PyExc_IndexError, "index out of range");
Expand Down Expand Up @@ -939,7 +939,7 @@ BIIterSelector_new(BlockIndexObject *bi,
// block index new, init, memory

// Returns 0 on succes, -1 on error.
static inline int
static int
AK_BI_BIR_new(BlockIndexObject* bi) {
BlockIndexRecord* bir = (BlockIndexRecord*)PyMem_Malloc(
sizeof(BlockIndexRecord) * bi->bir_capacity);
Expand All @@ -952,7 +952,7 @@ AK_BI_BIR_new(BlockIndexObject* bi) {
}

// Returns 0 on success, -1 on error
static inline int
static int
AK_BI_BIR_resize(BlockIndexObject* bi, Py_ssize_t increment) {
Py_ssize_t target = bi->bir_count + increment;
Py_ssize_t capacity = bi->bir_capacity;
Expand Down Expand Up @@ -1153,7 +1153,7 @@ BlockIndex_to_list(BlockIndexObject *self, PyObject *Py_UNUSED(unused)) {
}

// Returns NULL on error
static inline PyObject *
static PyObject *
AK_BI_to_bytes(BlockIndexObject *self) {
Py_ssize_t size = self->bir_count * sizeof(BlockIndexRecord);
// bytes might be null on error
Expand Down
Loading

0 comments on commit 82d11d1

Please sign in to comment.