| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -4829,6 +4829,30 @@ sequence_del_slice(PyObject* self, PyObject *args) | |
| Py_RETURN_NONE; | ||
| } | ||
|
|
||
| static PyObject * | ||
| sequence_repeat(PyObject* self, PyObject *args) | ||
| { | ||
| PyObject *sequence; | ||
| Py_ssize_t count; | ||
| if (!PyArg_ParseTuple(args, "On", &sequence, &count)) { | ||
| return NULL; | ||
| } | ||
|
|
||
| return PySequence_Repeat(sequence, count); | ||
| } | ||
|
|
||
| static PyObject * | ||
| sequence_inplace_repeat(PyObject* self, PyObject *args) | ||
| { | ||
| PyObject *sequence; | ||
| Py_ssize_t count; | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityPEP 7: blank line after local variable declarations;)
Sorry, something went wrong.
All reactions
|
||
| if (!PyArg_ParseTuple(args, "On", &sequence, &count)) { | ||
| return NULL; | ||
| } | ||
|
|
||
| return PySequence_InPlaceRepeat(sequence, count); | ||
| } | ||
|
|
||
| static PyObject * | ||
| test_pythread_tss_key_state(PyObject *self, PyObject *args) | ||
| { | ||
| Expand Down Expand Up | @@ -6376,6 +6400,8 @@ static PyMethodDef TestMethods[] = { | |
| {"mapping_has_key", mapping_has_key, METH_VARARGS}, | ||
| {"sequence_set_slice", sequence_set_slice, METH_VARARGS}, | ||
| {"sequence_del_slice", sequence_del_slice, METH_VARARGS}, | ||
| {"sequence_repeat", sequence_repeat, METH_VARARGS}, | ||
| {"sequence_inplace_repeat", sequence_inplace_repeat, METH_VARARGS}, | ||
| {"test_pythread_tss_key_state", test_pythread_tss_key_state, METH_VARARGS}, | ||
| {"hamt", new_hamt, METH_NOARGS}, | ||
| {"bad_get", _PyCFunction_CAST(bad_get), METH_FASTCALL}, | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityAnd here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.