static PyObject *
string_ljust(PyStringObject *self, PyObject *args)
{
- int width;
+ Py_ssize_t width;
char fillchar = ' ';
- if (!PyArg_ParseTuple(args, "i|c:ljust", &width, &fillchar))
+ if (!PyArg_ParseTuple(args, "n|c:ljust", &width, &fillchar))
return NULL;
if (PyString_GET_SIZE(self) >= width && PyString_CheckExact(self)) {
static PyObject *
string_rjust(PyStringObject *self, PyObject *args)
{
- int width;
+ Py_ssize_t width;
char fillchar = ' ';
- if (!PyArg_ParseTuple(args, "i|c:rjust", &width, &fillchar))
+ if (!PyArg_ParseTuple(args, "n|c:rjust", &width, &fillchar))
return NULL;
if (PyString_GET_SIZE(self) >= width && PyString_CheckExact(self)) {
string_center(PyStringObject *self, PyObject *args)
{
Py_ssize_t marg, left;
- long width;
+ Py_ssize_t width;
char fillchar = ' ';
- if (!PyArg_ParseTuple(args, "l|c:center", &width, &fillchar))
+ if (!PyArg_ParseTuple(args, "n|c:center", &width, &fillchar))
return NULL;
if (PyString_GET_SIZE(self) >= width && PyString_CheckExact(self)) {
Py_ssize_t fill;
PyObject *s;
char *p;
+ Py_ssize_t width;
- long width;
- if (!PyArg_ParseTuple(args, "l:zfill", &width))
+ if (!PyArg_ParseTuple(args, "n:zfill", &width))
return NULL;
if (PyString_GET_SIZE(self) >= width) {