Created
May 23, 2019 04:47
-
-
Save ridiculousfish/ffe4fa2a17c831ed06e57cfb2c467b25 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static PyObject * | |
long_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) | |
{ | |
PyObject *return_value = NULL; | |
static const char * const _keywords[] = {"", "base", NULL}; | |
static _PyArg_Parser _parser = {NULL, _keywords, "int", 0}; | |
PyObject *argsbuf[2]; | |
PyObject * const *fastargs; | |
Py_ssize_t nargs = PyTuple_GET_SIZE(args); | |
Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; | |
PyObject *x = NULL; | |
PyObject *obase = NULL; | |
fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); | |
if (!fastargs) { | |
goto exit; | |
} | |
if (nargs < 1) { | |
goto skip_optional_posonly; | |
} | |
noptargs--; | |
x = fastargs[0]; | |
skip_optional_posonly: | |
if (!noptargs) { | |
goto skip_optional_pos; | |
} | |
obase = fastargs[1]; | |
skip_optional_pos: | |
return_value = long_new_impl(type, x, obase); | |
exit: | |
return return_value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment