Skip to content

Commit 71f2dd2

Browse files
committed
PL/Python: Remove PLy_result_ass_item
It is apparently no longer used after the new slicing support was implemented (a97207b), so let's remove the dead code and see if anything cares.
1 parent d6ce58c commit 71f2dd2

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/pl/plpython/plpy_resultobject.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ static PyObject *PLy_result_status(PyObject *self, PyObject *args);
2121
static Py_ssize_t PLy_result_length(PyObject *arg);
2222
static PyObject *PLy_result_item(PyObject *arg, Py_ssize_t idx);
2323
static PyObject *PLy_result_slice(PyObject *arg, Py_ssize_t lidx, Py_ssize_t hidx);
24-
static int PLy_result_ass_item(PyObject *arg, Py_ssize_t idx, PyObject *item);
2524
static int PLy_result_ass_slice(PyObject *rg, Py_ssize_t lidx, Py_ssize_t hidx, PyObject *slice);
2625
static PyObject *PLy_result_subscript(PyObject *arg, PyObject *item);
2726
static int PLy_result_ass_subscript(PyObject *self, PyObject *item, PyObject *value);
@@ -36,7 +35,7 @@ static PySequenceMethods PLy_result_as_sequence = {
3635
NULL, /* sq_repeat */
3736
PLy_result_item, /* sq_item */
3837
PLy_result_slice, /* sq_slice */
39-
PLy_result_ass_item, /* sq_ass_item */
38+
NULL, /* sq_ass_item */
4039
PLy_result_ass_slice, /* sq_ass_slice */
4140
};
4241

@@ -231,17 +230,6 @@ PLy_result_item(PyObject *arg, Py_ssize_t idx)
231230
return rv;
232231
}
233232

234-
static int
235-
PLy_result_ass_item(PyObject *arg, Py_ssize_t idx, PyObject *item)
236-
{
237-
int rv;
238-
PLyResultObject *ob = (PLyResultObject *) arg;
239-
240-
Py_INCREF(item);
241-
rv = PyList_SetItem(ob->rows, idx, item);
242-
return rv;
243-
}
244-
245233
static PyObject *
246234
PLy_result_slice(PyObject *arg, Py_ssize_t lidx, Py_ssize_t hidx)
247235
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy