mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
Merging the gen-branch into the main line, at Guido's direction. Yay!
Bugfix candidate in inspect.py: it was referencing "self" outside of a method.
This commit is contained in:
parent
1dad6a86de
commit
5ca576ed0a
16 changed files with 1338 additions and 1157 deletions
|
@ -17,6 +17,7 @@
|
|||
|
||||
#define TYPE_NULL '0'
|
||||
#define TYPE_NONE 'N'
|
||||
#define TYPE_STOPITER 'S'
|
||||
#define TYPE_ELLIPSIS '.'
|
||||
#define TYPE_INT 'i'
|
||||
#define TYPE_INT64 'I'
|
||||
|
@ -120,6 +121,9 @@ w_object(PyObject *v, WFILE *p)
|
|||
else if (v == Py_None) {
|
||||
w_byte(TYPE_NONE, p);
|
||||
}
|
||||
else if (v == PyExc_StopIteration) {
|
||||
w_byte(TYPE_STOPITER, p);
|
||||
}
|
||||
else if (v == Py_Ellipsis) {
|
||||
w_byte(TYPE_ELLIPSIS, p);
|
||||
}
|
||||
|
@ -376,6 +380,10 @@ r_object(RFILE *p)
|
|||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
case TYPE_STOPITER:
|
||||
Py_INCREF(PyExc_StopIteration);
|
||||
return PyExc_StopIteration;
|
||||
|
||||
case TYPE_ELLIPSIS:
|
||||
Py_INCREF(Py_Ellipsis);
|
||||
return Py_Ellipsis;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue