Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
nineteendo committed Jul 17, 2024
1 parent d999af6 commit 7dde769
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 40 deletions.
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
# Personal Data
OBBEdit/2b_obb_original
OBBEdit/2c_obb_modded
OBBEdit/6_rsg_encoded_patches
OBBEdit/7_rsg_decoded_patches
ShopCreator/

# MISC
fail.txt
.DS_Store

# Byte-compiled / optimized / DLL files
Expand Down
30 changes: 0 additions & 30 deletions src/jsonyx/_accelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ py_encode_basestring_ascii(PyObject* Py_UNUSED(self), PyObject *pystr);
static PyObject *
scan_once_unicode(PyScannerObject *s, PyObject *memo, PyObject *pyfilename, PyObject *pystr, Py_ssize_t idx, Py_ssize_t *next_idx_ptr);
static PyObject *
_build_rval_index_tuple(PyObject *rval, Py_ssize_t idx);
static PyObject *
scanner_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
static void
scanner_dealloc(PyObject *self);
Expand Down Expand Up @@ -367,33 +365,6 @@ raise_errmsg(const char *msg, PyObject *filename, PyObject *s, Py_ssize_t end)
}
}

static PyObject *
_build_rval_index_tuple(PyObject *rval, Py_ssize_t idx) {
/* return (rval, idx) tuple, stealing reference to rval */
PyObject *tpl;
PyObject *pyidx;
/*
steal a reference to rval, returns (rval, idx)
*/
if (rval == NULL) {
return NULL;
}
pyidx = PyLong_FromSsize_t(idx);
if (pyidx == NULL) {
Py_DECREF(rval);
return NULL;
}
tpl = PyTuple_New(2);
if (tpl == NULL) {
Py_DECREF(pyidx);
Py_DECREF(rval);
return NULL;
}
PyTuple_SET_ITEM(tpl, 0, rval);
PyTuple_SET_ITEM(tpl, 1, pyidx);
return tpl;
}

static PyObject *
scanstring_unicode(PyObject *pyfilename, PyObject *pystr, Py_ssize_t end, Py_ssize_t *next_end_ptr)
{
Expand Down Expand Up @@ -1284,7 +1255,6 @@ encoder_listencode_obj(PyEncoderObject *s, PyObject *markers, _PyUnicodeWriter *
PyObject *obj, PyObject *newline_indent)
{
/* Encode Python object obj to a JSON term */
PyObject *newobj;
int rv;

if (obj == Py_None) {
Expand Down
2 changes: 1 addition & 1 deletion src/jsonyx/_accelerator.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ __all__: list[str] = [

from collections.abc import Callable

from typing_extensions import Any
from typing_extensions import Any # type: ignore


class DuplicateKey(str): # noqa: SLOT000
Expand Down
2 changes: 1 addition & 1 deletion src/jsonyx/test_jsonyx/test_loads.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from jsonyx import NAN, TRAILING_COMMA
# pylint: disable-next=W0611
from jsonyx.test_jsonyx import get_json # type: ignore # noqa: F401
from typing_extensions import Any
from typing_extensions import Any # type: ignore

if TYPE_CHECKING:
from types import ModuleType
Expand Down

0 comments on commit 7dde769

Please sign in to comment.