Hello, Defining a user type which implements number protocol should be treated as a number (long) in PyArg_ParseTuple using "l" format. In getargs.c: case 'l': {/* long int */ long *p = va_arg(*p_va, long *); long ival; if (float_argument_error(arg)) return converterr("integer<l>", arg, msgbuf, bufsize); ival = PyLong_AsLong(arg); if (ival == -1 && PyErr_Occurred()) return converterr("integer<l>", arg, msgbuf, bufsize); else *p = ival; break; } ival should not be resolved through PyLong_AsLong, but through functionality/interface like PyNumber_Long, thus allowing more diversity in accessing the PyArg_Parse interfaces. Petre
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4