~inkscape.dev/inkscape-devlibs64/trunk

« back to all changes in this revision

Viewing changes to python/include/genobject.h

  • Committer: Eduard Braun
  • Date: 2016-10-22 16:51:19 UTC
  • Revision ID: eduard.braun2@gmx.de-20161022165119-9eosgy6lp8j1kzli
Update Python to version 2.7.12

Included modules:
  coverage 4.2
  lxml 3.6.4
  numpy 1.11.2
  scour 0.35
  six 1.10.0

Show diffs side-by-side

added added

removed removed

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