Staging
v0.5.1
https://github.com/python/cpython
Revision c0b6cc8af1819f56b34a2e16e870bcc2f1cfd3f1 authored by Mark Dickinson on 04 May 2008, 02:07:53 UTC, committed by Mark Dickinson on 04 May 2008, 02:07:53 UTC
........
  r62684 | mark.dickinson | 2008-05-03 22:05:06 -0400 (Sat, 03 May 2008) | 9 lines

  Some very minor changes to decimal.py in Python 2.6, aimed
  at reducing the size of the diff between the 2.x decimal.py
  and 3.x decimal.py and thereby making future merges easier:

  - replace one instnace of an old-style raise statement
  - define __div__ in terms of __truediv__ instead of the
    other way around
  - make wording match on an exception message
........
1 parent 349a785
Raw File
Tip revision: c0b6cc8af1819f56b34a2e16e870bcc2f1cfd3f1 authored by Mark Dickinson on 04 May 2008, 02:07:53 UTC
Blocked revisions 62684 via svnmerge
Tip revision: c0b6cc8
genobject.h

/* Generator object interface */

#ifndef Py_GENOBJECT_H
#define Py_GENOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif

struct _frame; /* Avoid including frameobject.h */

typedef struct {
	PyObject_HEAD
	/* The gi_ prefix is intended to remind of generator-iterator. */

	/* Note: gi_frame can be NULL if the generator is "finished" */
	struct _frame *gi_frame;

	/* True if generator is being executed. */
	int gi_running;
    
	/* The code object backing the generator */
	PyObject *gi_code;

	/* List of weak reference. */
	PyObject *gi_weakreflist;
} PyGenObject;

PyAPI_DATA(PyTypeObject) PyGen_Type;

#define PyGen_Check(op) PyObject_TypeCheck(op, &PyGen_Type)
#define PyGen_CheckExact(op) (Py_TYPE(op) == &PyGen_Type)

PyAPI_FUNC(PyObject *) PyGen_New(struct _frame *);
PyAPI_FUNC(int) PyGen_NeedsFinalizing(PyGenObject *);

#ifdef __cplusplus
}
#endif
#endif /* !Py_GENOBJECT_H */
back to top