Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
823 B

  1. /* Generator object interface */
  2. #ifndef Py_GENOBJECT_H
  3. #define Py_GENOBJECT_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. struct _frame; /* Avoid including frameobject.h */
  8. typedef struct {
  9. PyObject_HEAD
  10. /* The gi_ prefix is intended to remind of generator-iterator. */
  11. /* Note: gi_frame can be NULL if the generator is "finished" */
  12. struct _frame *gi_frame;
  13. /* True if generator is being executed. */
  14. int gi_running;
  15. /* List of weak reference. */
  16. PyObject *gi_weakreflist;
  17. } PyGenObject;
  18. PyAPI_DATA(PyTypeObject) PyGen_Type;
  19. #define PyGen_Check(op) PyObject_TypeCheck(op, &PyGen_Type)
  20. #define PyGen_CheckExact(op) ((op)->ob_type == &PyGen_Type)
  21. PyAPI_FUNC(PyObject *) PyGen_New(struct _frame *);
  22. PyAPI_FUNC(int) PyGen_NeedsFinalizing(PyGenObject *);
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26. #endif /* !Py_GENOBJECT_H */