annotate src/pypm.c @ 3172:d1b367fc08bc tests-returncode

Use a return code of 1 when the tests fail.
author Thomas Kluyver <takowl@gmail.com>
date Wed, 09 Jan 2013 10:13:57 +0000
parents 0996a28d48b2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1 /* Generated by Cython 0.11.2 on Fri Mar 4 09:48:56 2011 */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3 #define PY_SSIZE_T_CLEAN
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4 #include "Python.h"
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5 #include "structmember.h"
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
6 #ifndef Py_PYTHON_H
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
7 #error Python headers needed to compile C extensions, please install development version of Python.
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
8 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
9 #ifndef PY_LONG_LONG
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
10 #define PY_LONG_LONG LONG_LONG
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
11 #endif
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
12 #ifndef DL_EXPORT
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
13 #define DL_EXPORT(t) t
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
14 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
15 #if PY_VERSION_HEX < 0x02040000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
16 #define METH_COEXIST 0
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
17 #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
18 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
19 #if PY_VERSION_HEX < 0x02050000
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
20 typedef int Py_ssize_t;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
21 #define PY_SSIZE_T_MAX INT_MAX
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
22 #define PY_SSIZE_T_MIN INT_MIN
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
23 #define PY_FORMAT_SIZE_T ""
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
24 #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
25 #define PyInt_AsSsize_t(o) PyInt_AsLong(o)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
26 #define PyNumber_Index(o) PyNumber_Int(o)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
27 #define PyIndex_Check(o) PyNumber_Check(o)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
28 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
29 #if PY_VERSION_HEX < 0x02060000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
30 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
31 #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
32 #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
33 #define PyVarObject_HEAD_INIT(type, size) \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
34 PyObject_HEAD_INIT(type) size,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
35 #define PyType_Modified(t)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
36
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
37 typedef struct {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
38 void *buf;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
39 PyObject *obj;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
40 Py_ssize_t len;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
41 Py_ssize_t itemsize;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
42 int readonly;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
43 int ndim;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
44 char *format;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
45 Py_ssize_t *shape;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
46 Py_ssize_t *strides;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
47 Py_ssize_t *suboffsets;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
48 void *internal;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
49 } Py_buffer;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
50
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
51 #define PyBUF_SIMPLE 0
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
52 #define PyBUF_WRITABLE 0x0001
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
53 #define PyBUF_FORMAT 0x0004
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
54 #define PyBUF_ND 0x0008
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
55 #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
56 #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
57 #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
58 #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
59 #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
60
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
61 #endif
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
62 #if PY_MAJOR_VERSION < 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
63 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
64 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
65 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
66 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
67 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
68 #define Py_TPFLAGS_CHECKTYPES 0
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
69 #define Py_TPFLAGS_HAVE_INDEX 0
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
70 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
71 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
72 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
73 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
74 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
75 #define PyBaseString_Type PyUnicode_Type
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
76 #define PyString_Type PyBytes_Type
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
77 #define PyString_CheckExact PyBytes_CheckExact
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
78 #define PyInt_Type PyLong_Type
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
79 #define PyInt_Check(op) PyLong_Check(op)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
80 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
81 #define PyInt_FromString PyLong_FromString
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
82 #define PyInt_FromUnicode PyLong_FromUnicode
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
83 #define PyInt_FromLong PyLong_FromLong
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
84 #define PyInt_FromSize_t PyLong_FromSize_t
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
85 #define PyInt_FromSsize_t PyLong_FromSsize_t
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
86 #define PyInt_AsLong PyLong_AsLong
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
87 #define PyInt_AS_LONG PyLong_AS_LONG
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
88 #define PyInt_AsSsize_t PyLong_AsSsize_t
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
89 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
90 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
91 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
92 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
93 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
94 #define PyBytes_Type PyString_Type
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
95 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
96 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
97 #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
98 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
99 #if !defined(WIN32) && !defined(MS_WINDOWS)
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
100 #ifndef __stdcall
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
101 #define __stdcall
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
102 #endif
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
103 #ifndef __cdecl
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
104 #define __cdecl
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
105 #endif
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
106 #ifndef __fastcall
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
107 #define __fastcall
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
108 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
109 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
110 #define _USE_MATH_DEFINES
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
111 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
112 #if PY_VERSION_HEX < 0x02050000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
113 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
114 #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
115 #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
116 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
117 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
118 #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
119 #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
120 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
121 #if PY_VERSION_HEX < 0x02050000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
122 #define __Pyx_NAMESTR(n) ((char *)(n))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
123 #define __Pyx_DOCSTR(n) ((char *)(n))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
124 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
125 #define __Pyx_NAMESTR(n) (n)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
126 #define __Pyx_DOCSTR(n) (n)
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
127 #endif
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
128 #ifdef __cplusplus
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
129 #define __PYX_EXTERN_C extern "C"
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
130 #else
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
131 #define __PYX_EXTERN_C extern
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
132 #endif
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
133 #include <math.h>
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
134 #define __PYX_HAVE_API__pypm
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
135 #include "portmidi.h"
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
136 #include "porttime.h"
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
137 #define __PYX_USE_C99_COMPLEX defined(_Complex_I)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
138
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
139
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
140 #ifdef __GNUC__
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
141 #define INLINE __inline__
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
142 #elif _WIN32
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
143 #define INLINE __inline
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
144 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
145 #define INLINE
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
146 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
147
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
148 typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
149
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
150
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
151
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
152 static int __pyx_skip_dispatch = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
153
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
154
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
155 /* Type Conversion Predeclarations */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
156
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
157 #if PY_MAJOR_VERSION < 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
158 #define __Pyx_PyBytes_FromString PyString_FromString
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
159 #define __Pyx_PyBytes_FromStringAndSize PyString_FromStringAndSize
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
160 #define __Pyx_PyBytes_AsString PyString_AsString
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
161 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
162 #define __Pyx_PyBytes_FromString PyBytes_FromString
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
163 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
164 #define __Pyx_PyBytes_AsString PyBytes_AsString
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
165 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
166
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
167 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
168 static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
169 static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
170
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
171 #if !defined(T_PYSSIZET)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
172 #if PY_VERSION_HEX < 0x02050000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
173 #define T_PYSSIZET T_INT
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
174 #elif !defined(T_LONGLONG)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
175 #define T_PYSSIZET \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
176 ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
177 ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
178 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
179 #define T_PYSSIZET \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
180 ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
181 ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
182 ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
183 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
184 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
185
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
186 #if !defined(T_SIZET)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
187 #if !defined(T_ULONGLONG)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
188 #define T_SIZET \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
189 ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
190 ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
191 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
192 #define T_SIZET \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
193 ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
194 ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
195 ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
196 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
197 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
198
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
199 static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
200 static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
201 static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
202
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
203 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
204
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
205
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
206 #ifdef __GNUC__
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
207 /* Test for GCC > 2.95 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
208 #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
209 #define likely(x) __builtin_expect(!!(x), 1)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
210 #define unlikely(x) __builtin_expect(!!(x), 0)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
211 #else /* __GNUC__ > 2 ... */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
212 #define likely(x) (x)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
213 #define unlikely(x) (x)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
214 #endif /* __GNUC__ > 2 ... */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
215 #else /* __GNUC__ */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
216 #define likely(x) (x)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
217 #define unlikely(x) (x)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
218 #endif /* __GNUC__ */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
219
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
220 static PyObject *__pyx_m;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
221 static PyObject *__pyx_b;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
222 static PyObject *__pyx_empty_tuple;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
223 static int __pyx_lineno;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
224 static int __pyx_clineno = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
225 static const char * __pyx_cfilenm= __FILE__;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
226 static const char *__pyx_filename;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
227 static const char **__pyx_f;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
228
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
229
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
230 #ifdef CYTHON_REFNANNY
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
231 typedef struct {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
232 void (*INCREF)(void*, PyObject*, int);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
233 void (*DECREF)(void*, PyObject*, int);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
234 void (*GOTREF)(void*, PyObject*, int);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
235 void (*GIVEREF)(void*, PyObject*, int);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
236 void* (*NewContext)(const char*, int, const char*);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
237 void (*FinishContext)(void**);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
238 } __Pyx_RefnannyAPIStruct;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
239 static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
240 #define __Pyx_ImportRefcountAPI(name) (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI")
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
241 #define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
242 #define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
243 #define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
244 #define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
245 #define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
246 #define __Pyx_SetupRefcountContext(name) void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
247 #define __Pyx_FinishRefcountContext() __Pyx_Refnanny->FinishContext(&__pyx_refchk)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
248 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
249 #define __Pyx_INCREF(r) Py_INCREF(r)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
250 #define __Pyx_DECREF(r) Py_DECREF(r)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
251 #define __Pyx_GOTREF(r)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
252 #define __Pyx_GIVEREF(r)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
253 #define __Pyx_XDECREF(r) Py_XDECREF(r)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
254 #define __Pyx_SetupRefcountContext(name)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
255 #define __Pyx_FinishRefcountContext()
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
256 #endif /* CYTHON_REFNANNY */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
257 #define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
258 #define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
259
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
260 static void __Pyx_RaiseDoubleKeywordsError(
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
261 const char* func_name, PyObject* kw_name); /*proto*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
262
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
263 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
264 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
265
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
266 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
267
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
268
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
269 static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
270 PyObject *r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
271 if (!j) return NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
272 r = PyObject_GetItem(o, j);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
273 Py_DECREF(j);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
274 return r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
275 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
276
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
277
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
278 #define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
279 __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
280 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
281
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
282 static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
283 if (likely(o != Py_None)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
284 if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
285 PyObject *r = PyList_GET_ITEM(o, i);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
286 Py_INCREF(r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
287 return r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
288 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
289 else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
290 PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
291 Py_INCREF(r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
292 return r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
293 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
294 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
295 return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
296 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
297
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
298 #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
299 __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
300 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
301
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
302 static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
303 if (likely(o != Py_None)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
304 if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
305 PyObject *r = PyTuple_GET_ITEM(o, i);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
306 Py_INCREF(r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
307 return r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
308 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
309 else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
310 PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
311 Py_INCREF(r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
312 return r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
313 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
314 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
315 return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
316 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
317
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
318
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
319 #define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
320 __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
321 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
322
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
323 static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
324 PyObject *r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
325 if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
326 r = PyList_GET_ITEM(o, i);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
327 Py_INCREF(r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
328 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
329 else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
330 r = PyTuple_GET_ITEM(o, i);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
331 Py_INCREF(r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
332 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
333 else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
334 r = PySequence_GetItem(o, i);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
335 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
336 else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
337 r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
338 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
339 return r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
340 }
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
341
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
342 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
343
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
344 static int __Pyx_Print(PyObject *, int); /*proto*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
345 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
346 static PyObject* __pyx_print = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
347 static PyObject* __pyx_print_kwargs = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
348 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
349
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
350 static int __Pyx_PrintOne(PyObject *o); /*proto*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
351
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
352 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
353
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
354 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
355
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
356 static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
357 static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
358
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
359 static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
360
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
361 static INLINE void __Pyx_RaiseTooManyValuesError(void);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
362
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
363 static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
364 static int __Pyx_EndUnpack(PyObject *); /*proto*/
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
365
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
366 static INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
367 if (likely(PyList_CheckExact(L))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
368 if (PyList_Append(L, x) < 0) return NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
369 Py_INCREF(Py_None);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
370 return Py_None; /* this is just to have an accurate signature */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
371 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
372 else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
373 PyObject *r, *m;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
374 m = __Pyx_GetAttrString(L, "append");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
375 if (!m) return NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
376 r = PyObject_CallFunctionObjArgs(m, x, NULL);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
377 Py_DECREF(m);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
378 return r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
379 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
380 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
381
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
382 static INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
383
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
384 static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
385
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
386 static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
387
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
388 static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
389
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
390 static INLINE char __Pyx_PyInt_AsChar(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
391
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
392 static INLINE short __Pyx_PyInt_AsShort(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
393
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
394 static INLINE int __Pyx_PyInt_AsInt(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
395
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
396 static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
397
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
398 static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
399
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
400 static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
401
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
402 static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
403
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
404 static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
405
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
406 static INLINE long __Pyx_PyInt_AsLong(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
407
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
408 static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
409
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
410 static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
411
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
412 static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
413
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
414 static void __Pyx_AddTraceback(const char *funcname); /*proto*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
415
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
416 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
417
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
418 /* Type declarations */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
419
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
420 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":248
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
421 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
422 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
423 * cdef class Output: # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
424 * """Represents an output MIDI stream device.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
425 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
426 */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
427
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
428 struct __pyx_obj_4pypm_Output {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
429 PyObject_HEAD
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
430 int device;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
431 PmStream *midi;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
432 int debug;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
433 int _aborted;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
434 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
435
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
436 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":509
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
437 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
438 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
439 * cdef class Input: # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
440 * """Represents an input MIDI stream device.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
441 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
442 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
443
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
444 struct __pyx_obj_4pypm_Input {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
445 PyObject_HEAD
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
446 int device;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
447 PmStream *midi;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
448 int debug;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
449 };
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
450 /* Module declarations from pypm */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
451
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
452 static PyTypeObject *__pyx_ptype_4pypm_Output = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
453 static PyTypeObject *__pyx_ptype_4pypm_Input = 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
454 #define __Pyx_MODULE_NAME "pypm"
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
455 int __pyx_module_is_main_pypm = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
456
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
457 /* Implementation of pypm */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
458 static char __pyx_k_3[] = "0.0.6";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
459 static PyObject *__pyx_int_0x1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
460 static PyObject *__pyx_int_0x2;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
461 static PyObject *__pyx_int_0x4;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
462 static PyObject *__pyx_int_0x8;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
463 static PyObject *__pyx_int_0x10;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
464 static PyObject *__pyx_int_0x20;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
465 static PyObject *__pyx_int_0x30;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
466 static PyObject *__pyx_int_0x40;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
467 static PyObject *__pyx_int_0x7F;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
468 static PyObject *__pyx_int_0x80;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
469 static PyObject *__pyx_int_0x100;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
470 static PyObject *__pyx_int_0x200;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
471 static PyObject *__pyx_int_0x300;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
472 static PyObject *__pyx_int_0x400;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
473 static PyObject *__pyx_int_0x800;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
474 static PyObject *__pyx_int_0x1000;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
475 static PyObject *__pyx_int_0x2000;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
476 static PyObject *__pyx_int_0x4000;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
477 static PyObject *__pyx_int_0x8000;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
478 static PyObject *__pyx_int_0x10000;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
479 static PyObject *__pyx_int_0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
480 static PyObject *__pyx_int_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
481 static PyObject *__pyx_int_4096;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
482 static PyObject *__pyx_int_0xFF;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
483 static PyObject *__pyx_int_16;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
484 static PyObject *__pyx_int_0xFF0000;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
485 static PyObject *__pyx_int_8;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
486 static PyObject *__pyx_int_0xFF00;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
487 static PyObject *__pyx_int_1024;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
488 static char __pyx_k___main__[] = "__main__";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
489 static PyObject *__pyx_kp___main__;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
490 static char __pyx_k___init__[] = "__init__";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
491 static PyObject *__pyx_kp___init__;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
492 static char __pyx_k___dealloc__[] = "__dealloc__";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
493 static PyObject *__pyx_kp___dealloc__;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
494 static char __pyx_k__check_open[] = "_check_open";
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
495 static PyObject *__pyx_kp__check_open;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
496 static char __pyx_k_Close[] = "Close";
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
497 static PyObject *__pyx_kp_Close;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
498 static char __pyx_k_Abort[] = "Abort";
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
499 static PyObject *__pyx_kp_Abort;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
500 static char __pyx_k_Write[] = "Write";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
501 static PyObject *__pyx_kp_Write;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
502 static char __pyx_k_WriteShort[] = "WriteShort";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
503 static PyObject *__pyx_kp_WriteShort;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
504 static char __pyx_k_WriteSysEx[] = "WriteSysEx";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
505 static PyObject *__pyx_kp_WriteSysEx;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
506 static char __pyx_k_SetFilter[] = "SetFilter";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
507 static PyObject *__pyx_kp_SetFilter;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
508 static char __pyx_k_SetChannelMask[] = "SetChannelMask";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
509 static PyObject *__pyx_kp_SetChannelMask;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
510 static char __pyx_k_Poll[] = "Poll";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
511 static PyObject *__pyx_kp_Poll;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
512 static char __pyx_k_Read[] = "Read";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
513 static PyObject *__pyx_kp_Read;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
514 static char __pyx_k_device_no[] = "device_no";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
515 static PyObject *__pyx_kp_device_no;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
516 static char __pyx_k_err[] = "err";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
517 static PyObject *__pyx_kp_err;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
518 static char __pyx_k_chan[] = "chan";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
519 static PyObject *__pyx_kp_chan;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
520 static char __pyx_k_output_device[] = "output_device";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
521 static PyObject *__pyx_kp_output_device;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
522 static char __pyx_k_latency[] = "latency";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
523 static PyObject *__pyx_kp_latency;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
524 static char __pyx_k_data[] = "data";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
525 static PyObject *__pyx_kp_data;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
526 static char __pyx_k_status[] = "status";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
527 static PyObject *__pyx_kp_status;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
528 static char __pyx_k_1[] = "data1";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
529 static PyObject *__pyx_kp_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
530 static char __pyx_k_2[] = "data2";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
531 static PyObject *__pyx_kp_2;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
532 static char __pyx_k_when[] = "when";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
533 static PyObject *__pyx_kp_when;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
534 static char __pyx_k_msg[] = "msg";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
535 static PyObject *__pyx_kp_msg;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
536 static char __pyx_k_input_device[] = "input_device";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
537 static PyObject *__pyx_kp_input_device;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
538 static char __pyx_k_buffersize[] = "buffersize";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
539 static PyObject *__pyx_kp_buffersize;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
540 static char __pyx_k_filters[] = "filters";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
541 static PyObject *__pyx_kp_filters;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
542 static char __pyx_k_mask[] = "mask";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
543 static PyObject *__pyx_kp_mask;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
544 static char __pyx_k_max_events[] = "max_events";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
545 static PyObject *__pyx_kp_max_events;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
546 static char __pyx_k___version__[] = "__version__";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
547 static PyObject *__pyx_kp___version__;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
548 static char __pyx_k_array[] = "array";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
549 static PyObject *__pyx_kp_array;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
550 static char __pyx_k_FILT_ACTIVE[] = "FILT_ACTIVE";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
551 static PyObject *__pyx_kp_FILT_ACTIVE;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
552 static char __pyx_k_FILT_SYSEX[] = "FILT_SYSEX";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
553 static PyObject *__pyx_kp_FILT_SYSEX;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
554 static char __pyx_k_FILT_CLOCK[] = "FILT_CLOCK";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
555 static PyObject *__pyx_kp_FILT_CLOCK;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
556 static char __pyx_k_FILT_PLAY[] = "FILT_PLAY";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
557 static PyObject *__pyx_kp_FILT_PLAY;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
558 static char __pyx_k_4[] = "FILT_F9";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
559 static PyObject *__pyx_kp_4;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
560 static char __pyx_k_FILT_TICK[] = "FILT_TICK";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
561 static PyObject *__pyx_kp_FILT_TICK;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
562 static char __pyx_k_FILT_FD[] = "FILT_FD";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
563 static PyObject *__pyx_kp_FILT_FD;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
564 static char __pyx_k_FILT_UNDEFINED[] = "FILT_UNDEFINED";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
565 static PyObject *__pyx_kp_FILT_UNDEFINED;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
566 static char __pyx_k_FILT_RESET[] = "FILT_RESET";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
567 static PyObject *__pyx_kp_FILT_RESET;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
568 static char __pyx_k_FILT_REALTIME[] = "FILT_REALTIME";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
569 static PyObject *__pyx_kp_FILT_REALTIME;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
570 static char __pyx_k_FILT_NOTE[] = "FILT_NOTE";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
571 static PyObject *__pyx_kp_FILT_NOTE;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
572 static char __pyx_k_5[] = "FILT_CHANNEL_AFTERTOUCH";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
573 static PyObject *__pyx_kp_5;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
574 static char __pyx_k_6[] = "FILT_POLY_AFTERTOUCH";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
575 static PyObject *__pyx_kp_6;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
576 static char __pyx_k_FILT_AFTERTOUCH[] = "FILT_AFTERTOUCH";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
577 static PyObject *__pyx_kp_FILT_AFTERTOUCH;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
578 static char __pyx_k_FILT_PROGRAM[] = "FILT_PROGRAM";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
579 static PyObject *__pyx_kp_FILT_PROGRAM;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
580 static char __pyx_k_FILT_CONTROL[] = "FILT_CONTROL";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
581 static PyObject *__pyx_kp_FILT_CONTROL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
582 static char __pyx_k_FILT_PITCHBEND[] = "FILT_PITCHBEND";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
583 static PyObject *__pyx_kp_FILT_PITCHBEND;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
584 static char __pyx_k_FILT_MTC[] = "FILT_MTC";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
585 static PyObject *__pyx_kp_FILT_MTC;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
586 static char __pyx_k_FILT_SONG_POSITION[] = "FILT_SONG_POSITION";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
587 static PyObject *__pyx_kp_FILT_SONG_POSITION;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
588 static char __pyx_k_FILT_SONG_SELECT[] = "FILT_SONG_SELECT";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
589 static PyObject *__pyx_kp_FILT_SONG_SELECT;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
590 static char __pyx_k_FILT_TUNE[] = "FILT_TUNE";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
591 static PyObject *__pyx_kp_FILT_TUNE;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
592 static char __pyx_k_FALSE[] = "FALSE";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
593 static PyObject *__pyx_kp_FALSE;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
594 static char __pyx_k_TRUE[] = "TRUE";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
595 static PyObject *__pyx_kp_TRUE;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
596 static char __pyx_k_Exception[] = "Exception";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
597 static PyObject *__pyx_kp_Exception;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
598 static char __pyx_k_IndexError[] = "IndexError";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
599 static PyObject *__pyx_kp_IndexError;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
600 static char __pyx_k_enumerate[] = "enumerate";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
601 static PyObject *__pyx_kp_enumerate;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
602 static char __pyx_k_ValueError[] = "ValueError";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
603 static PyObject *__pyx_kp_ValueError;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
604 static char __pyx_k_range[] = "range";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
605 static PyObject *__pyx_kp_range;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
606 static char __pyx_k_18[] = "B";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
607 static PyObject *__pyx_kp_18;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
608 static char __pyx_k_tostring[] = "tostring";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
609 static PyObject *__pyx_kp_tostring;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
610 static char __pyx_k_append[] = "append";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
611 static PyObject *__pyx_kp_append;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
612 static PyObject *__pyx_kp_3;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
613 static PyObject *__pyx_builtin_Exception;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
614 static PyObject *__pyx_builtin_IndexError;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
615 static PyObject *__pyx_builtin_enumerate;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
616 static PyObject *__pyx_builtin_ValueError;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
617 static PyObject *__pyx_builtin_range;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
618 static PyObject *__pyx_kp_7;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
619 static PyObject *__pyx_kp_8;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
620 static char __pyx_k_7[] = "Opening Midi Output";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
621 static char __pyx_k_8[] = "Unable to open Midi OutputDevice=%i: %s";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
622 static PyObject *__pyx_kp_9;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
623 static char __pyx_k_9[] = "Closing MIDI output stream and destroying instance.";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
624 static PyObject *__pyx_kp_10;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
625 static PyObject *__pyx_kp_11;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
626 static char __pyx_k_10[] = "midi Output not open.";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
627 static char __pyx_k_11[] = "midi Output aborted. Need to call Close after Abort.";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
628 static PyObject *__pyx_kp_12;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
629 static PyObject *__pyx_kp_13;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
630 static PyObject *__pyx_kp_14;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
631 static PyObject *__pyx_kp_15;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
632 static PyObject *__pyx_kp_16;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
633 static char __pyx_k_12[] = "Maximum event list length is 1024.";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
634 static char __pyx_k_13[] = "No data in event no. %i.";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
635 static char __pyx_k_14[] = "Too many data bytes (%i) in event no. %i.";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
636 static char __pyx_k_15[] = "%i : %r : %s";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
637 static char __pyx_k_16[] = "Writing to midi buffer.";
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
638 static PyObject *__pyx_kp_17;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
639 static char __pyx_k_17[] = "Writing to MIDI buffer.";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
640 static PyObject *__pyx_kp_19;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
641 static char __pyx_k_19[] = "MIDI input opened.";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
642 static PyObject *__pyx_kp_20;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
643 static char __pyx_k_20[] = "Closing MIDI input stream and destroying instance";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
644 static PyObject *__pyx_kp_21;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
645 static char __pyx_k_21[] = "midi Input not open.";
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
646 static PyObject *__pyx_kp_22;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
647 static PyObject *__pyx_kp_23;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
648 static char __pyx_k_22[] = "Maximum buffer length is 1024.";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
649 static char __pyx_k_23[] = "Minimum buffer length is 1.";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
650
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
651 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
652 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
653 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
654 * def Initialize(): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
655 * """Initialize PortMidi library.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
656 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
657 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
658
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
659 static PyObject *__pyx_pf_4pypm_Initialize(PyObject *__pyx_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
660 static char __pyx_doc_4pypm_Initialize[] = "Initialize PortMidi library.\n\n This function must be called once before any other function or class from\n this module can be used.\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
661 static PyObject *__pyx_pf_4pypm_Initialize(PyObject *__pyx_self, PyObject *unused) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
662 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
663 __Pyx_SetupRefcountContext("Initialize");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
664 __pyx_self = __pyx_self;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
665
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
666 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":156
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
667 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
668 * """
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
669 * Pm_Initialize() # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
670 * # equiv to TIME_START: start timer w/ ms accuracy
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
671 * Pt_Start(1, NULL, NULL)
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
672 */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
673 Pm_Initialize();
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
674
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
675 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":158
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
676 * Pm_Initialize()
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
677 * # equiv to TIME_START: start timer w/ ms accuracy
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
678 * Pt_Start(1, NULL, NULL) # <<<<<<<<<<<<<<
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
679 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
680 * def Terminate():
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
681 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
682 Pt_Start(1, NULL, NULL);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
683
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
684 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
685 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
686 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
687 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
688 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
689
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
690 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":160
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
691 * Pt_Start(1, NULL, NULL)
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
692 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
693 * def Terminate(): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
694 * """Terminate use of PortMidi library.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
695 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
696 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
697
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
698 static PyObject *__pyx_pf_4pypm_Terminate(PyObject *__pyx_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
699 static char __pyx_doc_4pypm_Terminate[] = "Terminate use of PortMidi library.\n\n Call this to clean up Midi streams when done.\n\n If you do not call this on Windows machines when you are done with MIDI,\n your system may crash.\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
700 static PyObject *__pyx_pf_4pypm_Terminate(PyObject *__pyx_self, PyObject *unused) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
701 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
702 __Pyx_SetupRefcountContext("Terminate");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
703 __pyx_self = __pyx_self;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
704
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
705 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":169
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
706 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
707 * """
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
708 * Pm_Terminate() # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
709 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
710 * def GetDefaultInputDeviceID():
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
711 */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
712 Pm_Terminate();
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
713
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
714 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
715 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
716 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
717 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
718 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
719
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
720 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":171
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
721 * Pm_Terminate()
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
722 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
723 * def GetDefaultInputDeviceID(): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
724 * """Return the number of the default MIDI input device.
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
725 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
726 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
727
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
728 static PyObject *__pyx_pf_4pypm_GetDefaultInputDeviceID(PyObject *__pyx_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
729 static char __pyx_doc_4pypm_GetDefaultInputDeviceID[] = "Return the number of the default MIDI input device.\n\n See the PortMidi documentation on how the default device is set and\n determined.\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
730 static PyObject *__pyx_pf_4pypm_GetDefaultInputDeviceID(PyObject *__pyx_self, PyObject *unused) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
731 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
732 PyObject *__pyx_t_1 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
733 __Pyx_SetupRefcountContext("GetDefaultInputDeviceID");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
734 __pyx_self = __pyx_self;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
735
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
736 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":178
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
737 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
738 * """
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
739 * return Pm_GetDefaultInputDeviceID() # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
740 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
741 * def GetDefaultOutputDeviceID():
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
742 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
743 __Pyx_XDECREF(__pyx_r);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
744 __pyx_t_1 = PyInt_FromLong(Pm_GetDefaultInputDeviceID()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
745 __Pyx_GOTREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
746 __pyx_r = __pyx_t_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
747 __pyx_t_1 = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
748 goto __pyx_L0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
749
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
750 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
751 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
752 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
753 __Pyx_XDECREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
754 __Pyx_AddTraceback("pypm.GetDefaultInputDeviceID");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
755 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
756 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
757 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
758 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
759 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
760 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
761
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
762 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":180
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
763 * return Pm_GetDefaultInputDeviceID()
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
764 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
765 * def GetDefaultOutputDeviceID(): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
766 * """Return the number of the default MIDI output device.
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
767 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
768 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
769
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
770 static PyObject *__pyx_pf_4pypm_GetDefaultOutputDeviceID(PyObject *__pyx_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
771 static char __pyx_doc_4pypm_GetDefaultOutputDeviceID[] = "Return the number of the default MIDI output device.\n\n See the PortMidi documentation on how the default device is set and\n determined.\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
772 static PyObject *__pyx_pf_4pypm_GetDefaultOutputDeviceID(PyObject *__pyx_self, PyObject *unused) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
773 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
774 PyObject *__pyx_t_1 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
775 __Pyx_SetupRefcountContext("GetDefaultOutputDeviceID");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
776 __pyx_self = __pyx_self;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
777
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
778 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":187
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
779 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
780 * """
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
781 * return Pm_GetDefaultOutputDeviceID() # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
782 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
783 * def CountDevices():
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
784 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
785 __Pyx_XDECREF(__pyx_r);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
786 __pyx_t_1 = PyInt_FromLong(Pm_GetDefaultOutputDeviceID()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
787 __Pyx_GOTREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
788 __pyx_r = __pyx_t_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
789 __pyx_t_1 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
790 goto __pyx_L0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
791
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
792 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
793 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
794 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
795 __Pyx_XDECREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
796 __Pyx_AddTraceback("pypm.GetDefaultOutputDeviceID");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
797 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
798 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
799 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
800 __Pyx_FinishRefcountContext();
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
801 return __pyx_r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
802 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
803
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
804 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":189
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
805 * return Pm_GetDefaultOutputDeviceID()
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
806 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
807 * def CountDevices(): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
808 * """Return number of available MIDI (input and output) devices."""
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
809 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
810 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
811
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
812 static PyObject *__pyx_pf_4pypm_CountDevices(PyObject *__pyx_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
813 static char __pyx_doc_4pypm_CountDevices[] = "Return number of available MIDI (input and output) devices.";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
814 static PyObject *__pyx_pf_4pypm_CountDevices(PyObject *__pyx_self, PyObject *unused) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
815 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
816 PyObject *__pyx_t_1 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
817 __Pyx_SetupRefcountContext("CountDevices");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
818 __pyx_self = __pyx_self;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
819
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
820 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":192
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
821 * """Return number of available MIDI (input and output) devices."""
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
822 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
823 * return Pm_CountDevices() # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
824 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
825 * def GetDeviceInfo(device_no):
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
826 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
827 __Pyx_XDECREF(__pyx_r);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
828 __pyx_t_1 = PyInt_FromLong(Pm_CountDevices()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
829 __Pyx_GOTREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
830 __pyx_r = __pyx_t_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
831 __pyx_t_1 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
832 goto __pyx_L0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
833
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
834 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
835 goto __pyx_L0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
836 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
837 __Pyx_XDECREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
838 __Pyx_AddTraceback("pypm.CountDevices");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
839 __pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
840 __pyx_L0:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
841 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
842 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
843 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
844 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
845
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
846 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":194
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
847 * return Pm_CountDevices()
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
848 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
849 * def GetDeviceInfo(device_no): # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
850 * """Return device info tuple for MIDI device given by device_no.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
851 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
852 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
853
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
854 static PyObject *__pyx_pf_4pypm_GetDeviceInfo(PyObject *__pyx_self, PyObject *__pyx_v_device_no); /*proto*/
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
855 static char __pyx_doc_4pypm_GetDeviceInfo[] = "Return device info tuple for MIDI device given by device_no.\n\n The returned tuple has the following five items:\n\n * underlying MIDI API (string)\n * device name (string)\n * whether device can be opened as input (1) or not (0)\n * whether device can be opened as output (1) or not (0)\n * whether device is currently opened (1) or not (0)\n\n ";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
856 static PyObject *__pyx_pf_4pypm_GetDeviceInfo(PyObject *__pyx_self, PyObject *__pyx_v_device_no) {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
857 PmDeviceInfo *__pyx_v_info;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
858 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
859 PmDeviceID __pyx_t_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
860 int __pyx_t_2;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
861 PyObject *__pyx_t_3 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
862 PyObject *__pyx_t_4 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
863 PyObject *__pyx_t_5 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
864 PyObject *__pyx_t_6 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
865 PyObject *__pyx_t_7 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
866 PyObject *__pyx_t_8 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
867 __Pyx_SetupRefcountContext("GetDeviceInfo");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
868 __pyx_self = __pyx_self;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
869
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
870 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":210
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
871 * # disregarding the constness from Pm_GetDeviceInfo,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
872 * # since pyrex doesn't do const.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
873 * info = <PmDeviceInfo *>Pm_GetDeviceInfo(device_no) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
874 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
875 * if info != NULL:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
876 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
877 __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_device_no); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
878 __pyx_v_info = ((PmDeviceInfo *)Pm_GetDeviceInfo(__pyx_t_1));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
879
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
880 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":212
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
881 * info = <PmDeviceInfo *>Pm_GetDeviceInfo(device_no)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
882 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
883 * if info != NULL: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
884 * return info.interf, info.name, info.input, info.output, info.opened
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
885 * # return None
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
886 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
887 __pyx_t_2 = (__pyx_v_info != NULL);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
888 if (__pyx_t_2) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
889
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
890 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":213
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
891 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
892 * if info != NULL:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
893 * return info.interf, info.name, info.input, info.output, info.opened # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
894 * # return None
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
895 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
896 */
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
897 __Pyx_XDECREF(__pyx_r);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
898 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_info->interf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
899 __Pyx_GOTREF(__pyx_t_3);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
900 __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_info->name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
901 __Pyx_GOTREF(__pyx_t_4);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
902 __pyx_t_5 = PyInt_FromLong(__pyx_v_info->input); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
903 __Pyx_GOTREF(__pyx_t_5);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
904 __pyx_t_6 = PyInt_FromLong(__pyx_v_info->output); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
905 __Pyx_GOTREF(__pyx_t_6);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
906 __pyx_t_7 = PyInt_FromLong(__pyx_v_info->opened); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
907 __Pyx_GOTREF(__pyx_t_7);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
908 __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
909 __Pyx_GOTREF(((PyObject *)__pyx_t_8));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
910 PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
911 __Pyx_GIVEREF(__pyx_t_3);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
912 PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
913 __Pyx_GIVEREF(__pyx_t_4);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
914 PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_5);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
915 __Pyx_GIVEREF(__pyx_t_5);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
916 PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_6);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
917 __Pyx_GIVEREF(__pyx_t_6);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
918 PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_7);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
919 __Pyx_GIVEREF(__pyx_t_7);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
920 __pyx_t_3 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
921 __pyx_t_4 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
922 __pyx_t_5 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
923 __pyx_t_6 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
924 __pyx_t_7 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
925 __pyx_r = ((PyObject *)__pyx_t_8);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
926 __pyx_t_8 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
927 goto __pyx_L0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
928 goto __pyx_L5;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
929 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
930 __pyx_L5:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
931
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
932 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
933 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
934 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
935 __Pyx_XDECREF(__pyx_t_3);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
936 __Pyx_XDECREF(__pyx_t_4);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
937 __Pyx_XDECREF(__pyx_t_5);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
938 __Pyx_XDECREF(__pyx_t_6);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
939 __Pyx_XDECREF(__pyx_t_7);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
940 __Pyx_XDECREF(__pyx_t_8);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
941 __Pyx_AddTraceback("pypm.GetDeviceInfo");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
942 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
943 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
944 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
945 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
946 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
947 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
948
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
949 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":216
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
950 * # return None
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
951 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
952 * def Time(): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
953 * """Return the current time in ms of the PortMidi timer."""
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
954 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
955 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
956
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
957 static PyObject *__pyx_pf_4pypm_Time(PyObject *__pyx_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
958 static char __pyx_doc_4pypm_Time[] = "Return the current time in ms of the PortMidi timer.";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
959 static PyObject *__pyx_pf_4pypm_Time(PyObject *__pyx_self, PyObject *unused) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
960 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
961 PyObject *__pyx_t_1 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
962 __Pyx_SetupRefcountContext("Time");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
963 __pyx_self = __pyx_self;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
964
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
965 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":219
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
966 * """Return the current time in ms of the PortMidi timer."""
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
967 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
968 * return Pt_Time() # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
969 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
970 * def GetErrorText(err):
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
971 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
972 __Pyx_XDECREF(__pyx_r);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
973 __pyx_t_1 = PyInt_FromLong(Pt_Time()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
974 __Pyx_GOTREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
975 __pyx_r = __pyx_t_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
976 __pyx_t_1 = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
977 goto __pyx_L0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
978
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
979 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
980 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
981 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
982 __Pyx_XDECREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
983 __Pyx_AddTraceback("pypm.Time");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
984 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
985 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
986 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
987 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
988 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
989 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
990
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
991 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":221
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
992 * return Pt_Time()
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
993 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
994 * def GetErrorText(err): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
995 * """Return human-readable error message translated from error number."""
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
996 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
997 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
998
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
999 static PyObject *__pyx_pf_4pypm_GetErrorText(PyObject *__pyx_self, PyObject *__pyx_v_err); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1000 static char __pyx_doc_4pypm_GetErrorText[] = "Return human-readable error message translated from error number.";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1001 static PyObject *__pyx_pf_4pypm_GetErrorText(PyObject *__pyx_self, PyObject *__pyx_v_err) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1002 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1003 PmError __pyx_t_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1004 PyObject *__pyx_t_2 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1005 __Pyx_SetupRefcountContext("GetErrorText");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1006 __pyx_self = __pyx_self;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1007
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1008 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":224
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1009 * """Return human-readable error message translated from error number."""
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1010 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1011 * return Pm_GetErrorText(err) # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1012 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1013 * def Channel(chan):
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1014 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1015 __Pyx_XDECREF(__pyx_r);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1016 __pyx_t_1 = ((PmError)PyInt_AsLong(__pyx_v_err)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1017 __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1018 __Pyx_GOTREF(__pyx_t_2);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1019 __pyx_r = __pyx_t_2;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1020 __pyx_t_2 = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1021 goto __pyx_L0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1022
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1023 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1024 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1025 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1026 __Pyx_XDECREF(__pyx_t_2);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1027 __Pyx_AddTraceback("pypm.GetErrorText");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1028 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1029 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1030 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1031 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1032 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1033 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1034
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1035 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":226
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1036 * return Pm_GetErrorText(err)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1037 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1038 * def Channel(chan): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1039 * """Return Channel object for given MIDI channel number 1 - 16.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1040 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1041 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1042
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1043 static PyObject *__pyx_pf_4pypm_Channel(PyObject *__pyx_self, PyObject *__pyx_v_chan); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1044 static char __pyx_doc_4pypm_Channel[] = "Return Channel object for given MIDI channel number 1 - 16.\n\n Channel(<chan>) is used with ChannelMask on input MIDI streams.\n\n Example:\n\n To receive input on channels 1 and 10 on a MIDI stream called\n MidiIn::\n\n MidiIn.SetChannelMask(pypm.Channel(1) | pypm.Channel(10))\n\n .. note::\n PyPortMidi Channel function has been altered from\n the original PortMidi c call to correct for what\n seems to be a bug --- i.e. channel filters were\n all numbered from 0 to 15 instead of 1 to 16.\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1045 static PyObject *__pyx_pf_4pypm_Channel(PyObject *__pyx_self, PyObject *__pyx_v_chan) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1046 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1047 PyObject *__pyx_t_1 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1048 int __pyx_t_2;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1049 __Pyx_SetupRefcountContext("Channel");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1050 __pyx_self = __pyx_self;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1051
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1052 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":245
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1053 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1054 * """
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1055 * return Pm_Channel(chan - 1) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1056 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1057 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1058 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1059 __Pyx_XDECREF(__pyx_r);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1060 __pyx_t_1 = PyNumber_Subtract(__pyx_v_chan, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1061 __Pyx_GOTREF(__pyx_t_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1062 __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1063 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1064 __pyx_t_1 = PyInt_FromLong(Pm_Channel(__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1065 __Pyx_GOTREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1066 __pyx_r = __pyx_t_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1067 __pyx_t_1 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1068 goto __pyx_L0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1069
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1070 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1071 goto __pyx_L0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1072 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1073 __Pyx_XDECREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1074 __Pyx_AddTraceback("pypm.Channel");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1075 __pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1076 __pyx_L0:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1077 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1078 __Pyx_FinishRefcountContext();
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1079 return __pyx_r;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1080 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1081
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1082 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":263
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1083 * cdef int _aborted
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1084 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1085 * def __init__(self, output_device, latency=0): # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1086 * """Instantiate MIDI output stream object."""
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1087 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1088 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1089
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1090 static int __pyx_pf_4pypm_6Output___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1091 static char __pyx_doc_4pypm_6Output___init__[] = "Instantiate MIDI output stream object.";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1092 static int __pyx_pf_4pypm_6Output___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1093 PyObject *__pyx_v_output_device = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1094 PyObject *__pyx_v_latency = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1095 PmError __pyx_v_err;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1096 PmTimeProcPtr __pyx_v_PmPtr;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1097 PyObject *__pyx_v_errmsg;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1098 int __pyx_r;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1099 int __pyx_t_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1100 PyObject *__pyx_t_2 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1101 int __pyx_t_3;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1102 PmDeviceID __pyx_t_4;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1103 long __pyx_t_5;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1104 PyObject *__pyx_t_6 = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1105 static PyObject **__pyx_pyargnames[] = {&__pyx_kp_output_device,&__pyx_kp_latency,0};
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1106 __Pyx_SetupRefcountContext("__init__");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1107 if (unlikely(__pyx_kwds)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1108 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1109 PyObject* values[2] = {0,0};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1110 values[1] = __pyx_int_0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1111 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1112 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1113 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1114 case 0: break;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1115 default: goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1116 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1117 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1118 case 0:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1119 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_output_device);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1120 if (likely(values[0])) kw_args--;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1121 else goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1122 case 1:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1123 if (kw_args > 1) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1124 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_latency);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1125 if (unlikely(value)) { values[1] = value; kw_args--; }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1126 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1127 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1128 if (unlikely(kw_args > 0)) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1129 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1130 }
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1131 __pyx_v_output_device = values[0];
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1132 __pyx_v_latency = values[1];
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1133 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1134 __pyx_v_latency = __pyx_int_0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1135 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1136 case 2: __pyx_v_latency = PyTuple_GET_ITEM(__pyx_args, 1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1137 case 1: __pyx_v_output_device = PyTuple_GET_ITEM(__pyx_args, 0);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1138 break;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1139 default: goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1140 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1141 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1142 goto __pyx_L4_argument_unpacking_done;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1143 __pyx_L5_argtuple_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1144 __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1145 __pyx_L3_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1146 __Pyx_AddTraceback("pypm.Output.__init__");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1147 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1148 __pyx_L4_argument_unpacking_done:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1149 __pyx_v_errmsg = Py_None; __Pyx_INCREF(Py_None);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1150
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1151 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":270
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1152 * cdef PmTimeProcPtr PmPtr
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1153 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1154 * self.device = output_device # <<<<<<<<<<<<<<
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1155 * self.debug = 0
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1156 * self._aborted = 0
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1157 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1158 __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_output_device); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1159 ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->device = __pyx_t_1;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1160
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1161 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":271
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1162 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1163 * self.device = output_device
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1164 * self.debug = 0 # <<<<<<<<<<<<<<
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1165 * self._aborted = 0
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1166 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1167 */
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1168 ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->debug = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1169
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1170 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":272
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1171 * self.device = output_device
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1172 * self.debug = 0
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1173 * self._aborted = 0 # <<<<<<<<<<<<<<
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1174 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1175 * if latency == 0:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1176 */
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1177 ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->_aborted = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1178
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1179 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":274
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1180 * self._aborted = 0
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1181 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1182 * if latency == 0: # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1183 * PmPtr = NULL
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1184 * else:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1185 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1186 __pyx_t_2 = PyObject_RichCompare(__pyx_v_latency, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1187 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1188 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1189 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1190 if (__pyx_t_3) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1191
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1192 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":275
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1193 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1194 * if latency == 0:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1195 * PmPtr = NULL # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1196 * else:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1197 * PmPtr = <PmTimeProcPtr>&Pt_Time
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1198 */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1199 __pyx_v_PmPtr = NULL;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1200 goto __pyx_L6;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1201 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1202 /*else*/ {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1203
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1204 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":277
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1205 * PmPtr = NULL
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1206 * else:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1207 * PmPtr = <PmTimeProcPtr>&Pt_Time # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1208 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1209 * if self.debug:
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1210 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1211 __pyx_v_PmPtr = ((PmTimestamp (*)(void *))(&Pt_Time));
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1212 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1213 __pyx_L6:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1214
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1215 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":279
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1216 * PmPtr = <PmTimeProcPtr>&Pt_Time
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1217 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1218 * if self.debug: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1219 * print "Opening Midi Output"
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1220 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1221 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1222 __pyx_t_1 = ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->debug;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1223 if (__pyx_t_1) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1224
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1225 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":280
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1226 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1227 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1228 * print "Opening Midi Output" # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1229 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1230 * # Why is buffer size 0 here?
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1231 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1232 if (__Pyx_PrintOne(__pyx_kp_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1233 goto __pyx_L7;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1234 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1235 __pyx_L7:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1236
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1237 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":283
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1238 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1239 * # Why is buffer size 0 here?
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1240 * err = Pm_OpenOutput(&(self.midi), output_device, NULL, 0, PmPtr, NULL, # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1241 * latency)
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1242 * if err < 0:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1243 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1244 __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_v_output_device); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1245
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1246 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":284
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1247 * # Why is buffer size 0 here?
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1248 * err = Pm_OpenOutput(&(self.midi), output_device, NULL, 0, PmPtr, NULL,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1249 * latency) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1250 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1251 * errmsg = Pm_GetErrorText(err)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1252 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1253 __pyx_t_5 = __Pyx_PyInt_AsLong(__pyx_v_latency); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1254 __pyx_v_err = Pm_OpenOutput((&((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi), __pyx_t_4, NULL, 0, __pyx_v_PmPtr, NULL, __pyx_t_5);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1255
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1256 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":285
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1257 * err = Pm_OpenOutput(&(self.midi), output_device, NULL, 0, PmPtr, NULL,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1258 * latency)
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1259 * if err < 0: # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1260 * errmsg = Pm_GetErrorText(err)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1261 * # Something's amiss here - if we try to throw an Exception
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1262 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1263 __pyx_t_3 = (__pyx_v_err < 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1264 if (__pyx_t_3) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1265
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1266 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":286
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1267 * latency)
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1268 * if err < 0:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1269 * errmsg = Pm_GetErrorText(err) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1270 * # Something's amiss here - if we try to throw an Exception
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1271 * # here, we crash.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1272 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1273 __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1274 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1275 __Pyx_DECREF(__pyx_v_errmsg);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1276 __pyx_v_errmsg = __pyx_t_2;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1277 __pyx_t_2 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1278
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1279 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":289
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1280 * # Something's amiss here - if we try to throw an Exception
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1281 * # here, we crash.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1282 * if not err == -10000: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1283 * raise Exception(errmsg)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1284 * else:
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1285 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1286 __pyx_t_3 = (!(__pyx_v_err == -10000));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1287 if (__pyx_t_3) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1288
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1289 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":290
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1290 * # here, we crash.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1291 * if not err == -10000:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1292 * raise Exception(errmsg) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1293 * else:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1294 * print "Unable to open Midi OutputDevice=%i: %s" % (
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1295 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1296 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1297 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1298 __Pyx_INCREF(__pyx_v_errmsg);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1299 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_errmsg);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1300 __Pyx_GIVEREF(__pyx_v_errmsg);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1301 __pyx_t_6 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1302 __Pyx_GOTREF(__pyx_t_6);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1303 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1304 __Pyx_Raise(__pyx_t_6, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1305 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1306 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1307 goto __pyx_L9;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1308 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1309 /*else*/ {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1310
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1311 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":293
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1312 * else:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1313 * print "Unable to open Midi OutputDevice=%i: %s" % (
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1314 * output_device, errmsg) # <<<<<<<<<<<<<<
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1315 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1316 * def __dealloc__(self):
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1317 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1318 __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1319 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1320 __Pyx_INCREF(__pyx_v_output_device);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1321 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_output_device);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1322 __Pyx_GIVEREF(__pyx_v_output_device);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1323 __Pyx_INCREF(__pyx_v_errmsg);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1324 PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_errmsg);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1325 __Pyx_GIVEREF(__pyx_v_errmsg);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1326 __pyx_t_2 = PyNumber_Remainder(__pyx_kp_8, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1327 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1328 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1329 if (__Pyx_PrintOne(__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1330 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1331 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1332 __pyx_L9:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1333 goto __pyx_L8;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1334 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1335 __pyx_L8:;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1336
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1337 __pyx_r = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1338 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1339 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1340 __Pyx_XDECREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1341 __Pyx_XDECREF(__pyx_t_6);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1342 __Pyx_AddTraceback("pypm.Output.__init__");
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1343 __pyx_r = -1;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1344 __pyx_L0:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1345 __Pyx_DECREF(__pyx_v_errmsg);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1346 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1347 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1348 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1349
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1350 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":295
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1351 * output_device, errmsg)
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1352 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1353 * def __dealloc__(self): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1354 * """Close midi device if still open when the instance is destroyed."""
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1355 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1356 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1357
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1358 static void __pyx_pf_4pypm_6Output___dealloc__(PyObject *__pyx_v_self); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1359 static char __pyx_doc_4pypm_6Output___dealloc__[] = "Close midi device if still open when the instance is destroyed.";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1360 static void __pyx_pf_4pypm_6Output___dealloc__(PyObject *__pyx_v_self) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1361 PmError __pyx_v_err;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1362 int __pyx_t_1;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1363 int __pyx_t_2;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1364 PyObject *__pyx_t_3 = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1365 PyObject *__pyx_t_4 = NULL;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1366 __Pyx_SetupRefcountContext("__dealloc__");
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1367
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1368 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":300
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1369 * cdef PmError err
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1370 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1371 * if self.debug: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1372 * print "Closing MIDI output stream and destroying instance."
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1373 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1374 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1375 __pyx_t_1 = ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->debug;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1376 if (__pyx_t_1) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1377
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1378 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":301
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1379 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1380 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1381 * print "Closing MIDI output stream and destroying instance." # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1382 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1383 * if self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1384 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1385 if (__Pyx_PrintOne(__pyx_kp_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1386 goto __pyx_L5;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1387 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1388 __pyx_L5:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1389
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1390 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":303
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1391 * print "Closing MIDI output stream and destroying instance."
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1392 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1393 * if self.midi: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1394 * err = Pm_Close(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1395 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1396 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1397 __pyx_t_2 = (((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi != 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1398 if (__pyx_t_2) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1399
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1400 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":304
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1401 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1402 * if self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1403 * err = Pm_Close(self.midi) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1404 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1405 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1406 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1407 __pyx_v_err = Pm_Close(((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1408
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1409 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":305
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1410 * if self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1411 * err = Pm_Close(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1412 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1413 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1414 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1415 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1416 __pyx_t_2 = (__pyx_v_err < 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1417 if (__pyx_t_2) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1418
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1419 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":306
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1420 * err = Pm_Close(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1421 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1422 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1423 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1424 * def _check_open(self):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1425 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1426 __pyx_t_3 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1427 __Pyx_GOTREF(__pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1428 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1429 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1430 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1431 __Pyx_GIVEREF(__pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1432 __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1433 __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1434 __Pyx_GOTREF(__pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1435 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1436 __Pyx_Raise(__pyx_t_3, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1437 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1438 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1439 goto __pyx_L7;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1440 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1441 __pyx_L7:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1442 goto __pyx_L6;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1443 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1444 __pyx_L6:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1445
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1446 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1447 __pyx_L1_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1448 __Pyx_XDECREF(__pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1449 __Pyx_XDECREF(__pyx_t_4);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1450 __Pyx_AddTraceback("pypm.Output.__dealloc__");
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1451 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1452 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1453 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1454
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1455 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":308
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1456 * raise Exception(Pm_GetErrorText(err))
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1457 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1458 * def _check_open(self): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1459 * """Check whether midi device is open, and if not, raises an error.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1460 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1461 */
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1462
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1463 static PyObject *__pyx_pf_4pypm_6Output__check_open(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1464 static char __pyx_doc_4pypm_6Output__check_open[] = "Check whether midi device is open, and if not, raises an error.\n\n Internal method, should be used only by other methods of this class.\n\n ";
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1465 static PyObject *__pyx_pf_4pypm_6Output__check_open(PyObject *__pyx_v_self, PyObject *unused) {
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1466 PyObject *__pyx_r = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1467 int __pyx_t_1;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1468 PyObject *__pyx_t_2 = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1469 PyObject *__pyx_t_3 = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1470 int __pyx_t_4;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1471 __Pyx_SetupRefcountContext("_check_open");
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1472
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1473 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":314
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1474 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1475 * """
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1476 * if self.midi == NULL: # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1477 * raise Exception("midi Output not open.")
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1478 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1479 */
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1480 __pyx_t_1 = (((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi == NULL);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1481 if (__pyx_t_1) {
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1482
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1483 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":315
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1484 * """
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1485 * if self.midi == NULL:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1486 * raise Exception("midi Output not open.") # <<<<<<<<<<<<<<
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1487 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1488 * if self._aborted:
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1489 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1490 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1491 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1492 __Pyx_INCREF(__pyx_kp_10);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1493 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_10);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1494 __Pyx_GIVEREF(__pyx_kp_10);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1495 __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1496 __Pyx_GOTREF(__pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1497 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1498 __Pyx_Raise(__pyx_t_3, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1499 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1500 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1501 goto __pyx_L5;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1502 }
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1503 __pyx_L5:;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1504
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1505 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":317
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1506 * raise Exception("midi Output not open.")
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1507 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1508 * if self._aborted: # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1509 * raise Exception(
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1510 * "midi Output aborted. Need to call Close after Abort.")
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1511 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1512 __pyx_t_4 = ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->_aborted;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1513 if (__pyx_t_4) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1514
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1515 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":319
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1516 * if self._aborted:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1517 * raise Exception(
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1518 * "midi Output aborted. Need to call Close after Abort.") # <<<<<<<<<<<<<<
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1519 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1520 * def Close(self):
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1521 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1522 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1523 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1524 __Pyx_INCREF(__pyx_kp_11);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1525 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_11);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1526 __Pyx_GIVEREF(__pyx_kp_11);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1527 __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1528 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1529 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1530 __Pyx_Raise(__pyx_t_2, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1531 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1532 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1533 goto __pyx_L6;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1534 }
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1535 __pyx_L6:;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1536
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1537 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1538 goto __pyx_L0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1539 __pyx_L1_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1540 __Pyx_XDECREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1541 __Pyx_XDECREF(__pyx_t_3);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1542 __Pyx_AddTraceback("pypm.Output._check_open");
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1543 __pyx_r = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1544 __pyx_L0:;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1545 __Pyx_XGIVEREF(__pyx_r);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1546 __Pyx_FinishRefcountContext();
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1547 return __pyx_r;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1548 }
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1549
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1550 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":321
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1551 * "midi Output aborted. Need to call Close after Abort.")
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1552 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1553 * def Close(self): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1554 * """Close the midi output device, flushing any pending buffers.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1555 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1556 */
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1557
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1558 static PyObject *__pyx_pf_4pypm_6Output_Close(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1559 static char __pyx_doc_4pypm_6Output_Close[] = "Close the midi output device, flushing any pending buffers.\n\n PortMidi attempts to close open streams when the application exits --\n this is particularly difficult under Windows, so it is best to take\n care to close all devices explicitly.\n\n ";
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1560 static PyObject *__pyx_pf_4pypm_6Output_Close(PyObject *__pyx_v_self, PyObject *unused) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1561 PmError __pyx_v_err;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1562 PyObject *__pyx_r = NULL;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1563 int __pyx_t_1;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1564 PyObject *__pyx_t_2 = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1565 PyObject *__pyx_t_3 = NULL;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1566 __Pyx_SetupRefcountContext("Close");
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1567
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1568 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":331
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1569 * cdef PmError err
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1570 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1571 * if not self.midi: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1572 * return
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1573 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1574 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1575 __pyx_t_1 = (!(((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi != 0));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1576 if (__pyx_t_1) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1577
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1578 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":332
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1579 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1580 * if not self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1581 * return # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1582 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1583 * err = Pm_Close(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1584 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1585 __Pyx_XDECREF(__pyx_r);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1586 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1587 goto __pyx_L0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1588 goto __pyx_L5;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1589 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1590 __pyx_L5:;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1591
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1592 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":334
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1593 * return
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1594 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1595 * err = Pm_Close(self.midi) # <<<<<<<<<<<<<<
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1596 * if err < 0:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1597 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1598 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1599 __pyx_v_err = Pm_Close(((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1600
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1601 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":335
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1602 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1603 * err = Pm_Close(self.midi)
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1604 * if err < 0: # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1605 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1606 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1607 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1608 __pyx_t_1 = (__pyx_v_err < 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1609 if (__pyx_t_1) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1610
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1611 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":336
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1612 * err = Pm_Close(self.midi)
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1613 * if err < 0:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1614 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1615 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1616 * self.midi = NULL
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1617 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1618 __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1619 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1620 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1621 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1622 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1623 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1624 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1625 __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1626 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1627 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1628 __Pyx_Raise(__pyx_t_2, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1629 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1630 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1631 goto __pyx_L6;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1632 }
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1633 __pyx_L6:;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1634
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1635 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":338
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1636 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1637 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1638 * self.midi = NULL # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1639 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1640 * def Abort(self):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1641 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1642 ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi = NULL;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1643
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1644 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1645 goto __pyx_L0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1646 __pyx_L1_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1647 __Pyx_XDECREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1648 __Pyx_XDECREF(__pyx_t_3);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1649 __Pyx_AddTraceback("pypm.Output.Close");
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1650 __pyx_r = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1651 __pyx_L0:;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1652 __Pyx_XGIVEREF(__pyx_r);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1653 __Pyx_FinishRefcountContext();
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1654 return __pyx_r;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1655 }
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1656
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1657 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":340
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1658 * self.midi = NULL
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1659 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1660 * def Abort(self): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1661 * """Terminate outgoing messages immediately.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1662 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1663 */
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1664
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1665 static PyObject *__pyx_pf_4pypm_6Output_Abort(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1666 static char __pyx_doc_4pypm_6Output_Abort[] = "Terminate outgoing messages immediately.\n\n The caller should immediately close the output port after calling this\n method. This call may result in transmission of a partial midi message.\n There is no abort for Midi input because the user can simply ignore\n messages in the buffer and close an input device at any time.\n\n ";
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1667 static PyObject *__pyx_pf_4pypm_6Output_Abort(PyObject *__pyx_v_self, PyObject *unused) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1668 PmError __pyx_v_err;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1669 PyObject *__pyx_r = NULL;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1670 int __pyx_t_1;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1671 PyObject *__pyx_t_2 = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1672 PyObject *__pyx_t_3 = NULL;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1673 __Pyx_SetupRefcountContext("Abort");
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1674
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1675 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":351
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1676 * cdef PmError err
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1677 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1678 * if not self.midi: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1679 * return
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1680 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1681 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1682 __pyx_t_1 = (!(((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi != 0));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1683 if (__pyx_t_1) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1684
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1685 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":352
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1686 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1687 * if not self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1688 * return # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1689 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1690 * err = Pm_Abort(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1691 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1692 __Pyx_XDECREF(__pyx_r);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1693 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1694 goto __pyx_L0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1695 goto __pyx_L5;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1696 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1697 __pyx_L5:;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1698
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1699 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":354
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1700 * return
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1701 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1702 * err = Pm_Abort(self.midi) # <<<<<<<<<<<<<<
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1703 * if err < 0:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1704 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1705 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1706 __pyx_v_err = Pm_Abort(((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1707
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1708 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":355
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1709 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1710 * err = Pm_Abort(self.midi)
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1711 * if err < 0: # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1712 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1713 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1714 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1715 __pyx_t_1 = (__pyx_v_err < 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1716 if (__pyx_t_1) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1717
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1718 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":356
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1719 * err = Pm_Abort(self.midi)
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1720 * if err < 0:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1721 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1722 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1723 * self._aborted = 1
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1724 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1725 __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1726 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1727 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1728 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1729 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1730 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1731 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1732 __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1733 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1734 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1735 __Pyx_Raise(__pyx_t_2, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1736 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1737 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1738 goto __pyx_L6;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1739 }
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1740 __pyx_L6:;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1741
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1742 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":358
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1743 * raise Exception(Pm_GetErrorText(err))
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1744 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1745 * self._aborted = 1 # <<<<<<<<<<<<<<
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1746 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1747 * def Write(self, data):
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1748 */
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1749 ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->_aborted = 1;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1750
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1751 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1752 goto __pyx_L0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1753 __pyx_L1_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1754 __Pyx_XDECREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1755 __Pyx_XDECREF(__pyx_t_3);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1756 __Pyx_AddTraceback("pypm.Output.Abort");
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1757 __pyx_r = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1758 __pyx_L0:;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1759 __Pyx_XGIVEREF(__pyx_r);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1760 __Pyx_FinishRefcountContext();
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1761 return __pyx_r;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1762 }
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1763
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1764 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":360
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1765 * self._aborted = 1
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1766 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1767 * def Write(self, data): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1768 * """Output a series of MIDI events given by data list n this device.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1769 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1770 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1771
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1772 static PyObject *__pyx_pf_4pypm_6Output_Write(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1773 static char __pyx_doc_4pypm_6Output_Write[] = "Output a series of MIDI events given by data list n this device.\n\n Usage::\n\n Write([\n [[status, data1, data2, data3], timestamp],\n [[status, data1, data2, data3], timestamp],\n ...\n ])\n\n The data1/2/3 items in each event are optional::\n\n Write([[[0xc0, 0, 0], 20000]])\n\n is equivalent to::\n\n Write([[[0xc0], 20000]])\n\n Example:\n\n Send program change 1 at time 20000 and send note 65 with velocity 100\n at 500 ms later::\n\n Write([[[0xc0, 0, 0], 20000], [[0x90, 60, 100], 20500]])\n\n .. notes::\n 1. Timestamps will be ignored if latency == 0.\n\n 2. To get a note to play immediately, send the note on event with\n the result from the Time() function as the timestamp.\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1774 static PyObject *__pyx_pf_4pypm_6Output_Write(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1775 PmEvent __pyx_v_buffer[1024];
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1776 PmError __pyx_v_err;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1777 int __pyx_v_item;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1778 int __pyx_v_ev_no;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1779 PyObject *__pyx_v_event;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1780 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1781 PyObject *__pyx_1 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1782 PyObject *__pyx_2 = 0;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1783 PyObject *__pyx_t_1 = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1784 PyObject *__pyx_t_2 = NULL;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1785 Py_ssize_t __pyx_t_3;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1786 int __pyx_t_4;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1787 int __pyx_t_5;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1788 int __pyx_t_6;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1789 PyObject *__pyx_t_7 = NULL;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1790 Py_ssize_t __pyx_t_8;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1791 PyObject *__pyx_t_9 = NULL;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1792 PmMessage __pyx_t_10;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1793 PmTimestamp __pyx_t_11;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1794 PyObject *__pyx_t_12 = NULL;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1795 __Pyx_SetupRefcountContext("Write");
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1796 __pyx_v_event = Py_None; __Pyx_INCREF(Py_None);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1797
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1798 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":398
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1799 * cdef int ev_no
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1800 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1801 * self._check_open() # <<<<<<<<<<<<<<
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1802 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1803 * if len(data) > 1024:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1804 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1805 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp__check_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1806 __Pyx_GOTREF(__pyx_t_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1807 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1808 __Pyx_GOTREF(__pyx_t_2);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1809 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1810 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1811
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1812 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":400
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1813 * self._check_open()
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1814 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1815 * if len(data) > 1024: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1816 * raise IndexError('Maximum event list length is 1024.')
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1817 * else:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1818 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1819 __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1820 __pyx_t_4 = (__pyx_t_3 > 1024);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1821 if (__pyx_t_4) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1822
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1823 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":401
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1824 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1825 * if len(data) > 1024:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1826 * raise IndexError('Maximum event list length is 1024.') # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1827 * else:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1828 * for ev_no, event in enumerate(data):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1829 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1830 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1831 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1832 __Pyx_INCREF(__pyx_kp_12);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1833 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_12);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1834 __Pyx_GIVEREF(__pyx_kp_12);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1835 __pyx_t_1 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1836 __Pyx_GOTREF(__pyx_t_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1837 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1838 __Pyx_Raise(__pyx_t_1, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1839 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1840 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1841 goto __pyx_L5;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1842 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1843 /*else*/ {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1844
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1845 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":403
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1846 * raise IndexError('Maximum event list length is 1024.')
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1847 * else:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1848 * for ev_no, event in enumerate(data): # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1849 * if not event[0]:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1850 * raise ValueError('No data in event no. %i.' % ev_no)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1851 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1852 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1853 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1854 __Pyx_INCREF(__pyx_v_data);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1855 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1856 __Pyx_GIVEREF(__pyx_v_data);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1857 __pyx_t_2 = PyObject_Call(__pyx_builtin_enumerate, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1858 __Pyx_GOTREF(__pyx_t_2);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1859 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1860 if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1861 __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1862 } else {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1863 __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1864 __Pyx_GOTREF(__pyx_t_1);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1865 }
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1866 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1867 for (;;) {
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1868 if (likely(PyList_CheckExact(__pyx_t_1))) {
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1869 if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1870 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1871 } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1872 if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1873 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1874 } else {
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1875 __pyx_t_2 = PyIter_Next(__pyx_t_1);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1876 if (!__pyx_t_2) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1877 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1878 break;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1879 }
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1880 __Pyx_GOTREF(__pyx_t_2);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1881 }
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1882 if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1883 PyObject* tuple = __pyx_t_2;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1884 __pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1885 __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1886 __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1887 __pyx_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1888 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1889 __pyx_v_ev_no = __pyx_t_5;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1890 __Pyx_DECREF(__pyx_v_event);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1891 __pyx_v_event = __pyx_2;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1892 __pyx_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1893 } else {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1894 __pyx_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1895 __Pyx_GOTREF(__pyx_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1896 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1897 __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1898 __Pyx_GOTREF(__pyx_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1899 __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1900 __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1901 __pyx_2 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1902 __Pyx_GOTREF(__pyx_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1903 if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1904 __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1905 __pyx_v_ev_no = __pyx_t_5;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1906 __Pyx_DECREF(__pyx_v_event);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1907 __pyx_v_event = __pyx_2;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1908 __pyx_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1909 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1910
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1911 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":404
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1912 * else:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1913 * for ev_no, event in enumerate(data):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1914 * if not event[0]: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1915 * raise ValueError('No data in event no. %i.' % ev_no)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1916 * if len(event[0]) > 4:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1917 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1918 __pyx_1 = __Pyx_GetItemInt(__pyx_v_event, 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1919 __Pyx_GOTREF(__pyx_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1920 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1921 __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1922 __pyx_t_6 = (!__pyx_t_4);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1923 if (__pyx_t_6) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1924
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1925 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":405
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1926 * for ev_no, event in enumerate(data):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1927 * if not event[0]:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1928 * raise ValueError('No data in event no. %i.' % ev_no) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1929 * if len(event[0]) > 4:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1930 * raise ValueError('Too many data bytes (%i) in event no. %i.'
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1931 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1932 __pyx_t_2 = PyInt_FromLong(__pyx_v_ev_no); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1933 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1934 __pyx_t_7 = PyNumber_Remainder(__pyx_kp_13, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1935 __Pyx_GOTREF(__pyx_t_7);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
1936 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1937 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1938 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1939 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1940 __Pyx_GIVEREF(__pyx_t_7);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1941 __pyx_t_7 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1942 __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1943 __Pyx_GOTREF(__pyx_t_7);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1944 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1945 __Pyx_Raise(__pyx_t_7, 0, 0);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1946 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1947 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1948 goto __pyx_L8;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1949 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
1950 __pyx_L8:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1951
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1952 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":406
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1953 * if not event[0]:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1954 * raise ValueError('No data in event no. %i.' % ev_no)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1955 * if len(event[0]) > 4: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1956 * raise ValueError('Too many data bytes (%i) in event no. %i.'
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1957 * % (len(event[0]), ev_no))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1958 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1959 __pyx_2 = __Pyx_GetItemInt(__pyx_v_event, 0, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1960 __Pyx_GOTREF(__pyx_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1961 __pyx_t_8 = PyObject_Length(__pyx_2); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1962 __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1963 __pyx_t_6 = (__pyx_t_8 > 4);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1964 if (__pyx_t_6) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1965
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1966 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":408
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1967 * if len(event[0]) > 4:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1968 * raise ValueError('Too many data bytes (%i) in event no. %i.'
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1969 * % (len(event[0]), ev_no)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1970 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1971 * buffer[ev_no].message = 0
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1972 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1973 __pyx_1 = __Pyx_GetItemInt(__pyx_v_event, 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1974 __Pyx_GOTREF(__pyx_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1975 __pyx_t_8 = PyObject_Length(__pyx_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1976 __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1977 __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
1978 __Pyx_GOTREF(__pyx_t_7);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1979 __pyx_t_2 = PyInt_FromLong(__pyx_v_ev_no); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1980 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1981 __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1982 __Pyx_GOTREF(((PyObject *)__pyx_t_9));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1983 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1984 __Pyx_GIVEREF(__pyx_t_7);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1985 PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1986 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1987 __pyx_t_7 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1988 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1989 __pyx_t_2 = PyNumber_Remainder(__pyx_kp_14, ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1990 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1991 __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1992 __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1993 __Pyx_GOTREF(((PyObject *)__pyx_t_9));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1994 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1995 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1996 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1997 __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1998 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
1999 __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2000 __Pyx_Raise(__pyx_t_2, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2001 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2002 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2003 goto __pyx_L9;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2004 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2005 __pyx_L9:;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2006
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2007 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":410
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2008 * % (len(event[0]), ev_no))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2009 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2010 * buffer[ev_no].message = 0 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2011 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2012 * for item in range(len(event[0])):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2013 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2014 (__pyx_v_buffer[__pyx_v_ev_no]).message = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2015
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2016 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":412
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2017 * buffer[ev_no].message = 0
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2018 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2019 * for item in range(len(event[0])): # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2020 * buffer[ev_no].message += (
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2021 * (event[0][item] & 0xFF) << (8 * item))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2022 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2023 __pyx_2 = __Pyx_GetItemInt(__pyx_v_event, 0, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2024 __Pyx_GOTREF(__pyx_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2025 __pyx_t_8 = PyObject_Length(__pyx_2); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2026 __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2027 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_8; __pyx_t_5+=1) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2028 __pyx_v_item = __pyx_t_5;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2029
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2030 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":414
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2031 * for item in range(len(event[0])):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2032 * buffer[ev_no].message += (
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2033 * (event[0][item] & 0xFF) << (8 * item)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2034 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2035 * buffer[ev_no].timestamp = event[1]
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2036 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2037 __pyx_1 = __Pyx_GetItemInt(__pyx_v_event, 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2038 __Pyx_GOTREF(__pyx_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2039 __pyx_2 = __Pyx_GetItemInt(__pyx_1, __pyx_v_item, sizeof(int), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2040 __Pyx_GOTREF(__pyx_2);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2041 __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2042 __pyx_t_2 = PyNumber_And(__pyx_2, __pyx_int_0xFF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2043 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2044 __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2045 __pyx_t_9 = PyInt_FromLong((8 * __pyx_v_item)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2046 __Pyx_GOTREF(__pyx_t_9);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2047 __pyx_t_7 = PyNumber_Lshift(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2048 __Pyx_GOTREF(__pyx_t_7);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2049 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2050 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2051 __pyx_t_10 = __Pyx_PyInt_AsLong(__pyx_t_7); if (unlikely((__pyx_t_10 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2052 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2053
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2054 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":413
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2055 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2056 * for item in range(len(event[0])):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2057 * buffer[ev_no].message += ( # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2058 * (event[0][item] & 0xFF) << (8 * item))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2059 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2060 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2061 (__pyx_v_buffer[__pyx_v_ev_no]).message += __pyx_t_10;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2062 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2063
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2064 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":416
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2065 * (event[0][item] & 0xFF) << (8 * item))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2066 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2067 * buffer[ev_no].timestamp = event[1] # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2068 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2069 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2070 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2071 __pyx_1 = __Pyx_GetItemInt(__pyx_v_event, 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2072 __Pyx_GOTREF(__pyx_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2073 __pyx_t_11 = __Pyx_PyInt_AsLong(__pyx_1); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2074 __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2075 (__pyx_v_buffer[__pyx_v_ev_no]).timestamp = __pyx_t_11;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2076
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2077 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":418
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2078 * buffer[ev_no].timestamp = event[1]
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2079 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2080 * if self.debug: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2081 * print "%i : %r : %s" % (
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2082 * ev_no, buffer[ev_no].message, buffer[ev_no].timestamp)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2083 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2084 __pyx_t_5 = ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->debug;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2085 if (__pyx_t_5) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2086
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2087 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":420
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2088 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2089 * print "%i : %r : %s" % (
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2090 * ev_no, buffer[ev_no].message, buffer[ev_no].timestamp) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2091 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2092 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2093 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2094 __pyx_t_7 = PyInt_FromLong(__pyx_v_ev_no); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2095 __Pyx_GOTREF(__pyx_t_7);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2096 __pyx_t_9 = PyInt_FromLong((__pyx_v_buffer[__pyx_v_ev_no]).message); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2097 __Pyx_GOTREF(__pyx_t_9);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2098 __pyx_t_2 = PyInt_FromLong((__pyx_v_buffer[__pyx_v_ev_no]).timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2099 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2100 __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2101 __Pyx_GOTREF(((PyObject *)__pyx_t_12));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2102 PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2103 __Pyx_GIVEREF(__pyx_t_7);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2104 PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_9);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2105 __Pyx_GIVEREF(__pyx_t_9);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2106 PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2107 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2108 __pyx_t_7 = 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2109 __pyx_t_9 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2110 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2111 __pyx_t_2 = PyNumber_Remainder(__pyx_kp_15, ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2112 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2113 __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2114 if (__Pyx_PrintOne(__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2115 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2116 goto __pyx_L12;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2117 }
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2118 __pyx_L12:;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2119 }
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2120 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2121 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2122 __pyx_L5:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2123
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2124 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":422
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2125 * ev_no, buffer[ev_no].message, buffer[ev_no].timestamp)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2126 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2127 * if self.debug: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2128 * print "Writing to midi buffer."
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2129 * err = Pm_Write(self.midi, buffer, len(data))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2130 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2131 __pyx_t_5 = ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->debug;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2132 if (__pyx_t_5) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2133
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2134 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":423
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2135 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2136 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2137 * print "Writing to midi buffer." # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2138 * err = Pm_Write(self.midi, buffer, len(data))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2139 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2140 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2141 if (__Pyx_PrintOne(__pyx_kp_16) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2142 goto __pyx_L13;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2143 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2144 __pyx_L13:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2145
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2146 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":424
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2147 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2148 * print "Writing to midi buffer."
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2149 * err = Pm_Write(self.midi, buffer, len(data)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2150 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2151 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2152 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2153 __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2154 __pyx_v_err = Pm_Write(((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi, __pyx_v_buffer, __pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2155
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2156 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":425
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2157 * print "Writing to midi buffer."
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2158 * err = Pm_Write(self.midi, buffer, len(data))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2159 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2160 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2161 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2162 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2163 __pyx_t_6 = (__pyx_v_err < 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2164 if (__pyx_t_6) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2165
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2166 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":426
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2167 * err = Pm_Write(self.midi, buffer, len(data))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2168 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2169 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2170 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2171 * def WriteShort(self, status, data1=0, data2=0):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2172 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2173 __pyx_t_1 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2174 __Pyx_GOTREF(__pyx_t_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2175 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2176 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2177 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2178 __Pyx_GIVEREF(__pyx_t_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2179 __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2180 __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2181 __Pyx_GOTREF(__pyx_t_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2182 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2183 __Pyx_Raise(__pyx_t_1, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2184 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2185 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2186 goto __pyx_L14;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2187 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2188 __pyx_L14:;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2189
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2190 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2191 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2192 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2193 __Pyx_XDECREF(__pyx_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2194 __Pyx_XDECREF(__pyx_2);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2195 __Pyx_XDECREF(__pyx_t_1);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2196 __Pyx_XDECREF(__pyx_t_2);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2197 __Pyx_XDECREF(__pyx_t_7);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2198 __Pyx_XDECREF(__pyx_t_9);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2199 __Pyx_XDECREF(__pyx_t_12);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2200 __Pyx_AddTraceback("pypm.Output.Write");
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2201 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2202 __pyx_L0:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2203 __Pyx_DECREF(__pyx_v_event);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2204 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2205 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2206 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2207 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2208
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2209 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":428
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2210 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2211 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2212 * def WriteShort(self, status, data1=0, data2=0): # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2213 * """Output MIDI event of three bytes or less immediately on this device.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2214 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2215 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2216
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2217 static PyObject *__pyx_pf_4pypm_6Output_WriteShort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2218 static char __pyx_doc_4pypm_6Output_WriteShort[] = "Output MIDI event of three bytes or less immediately on this device.\n\n Usage::\n\n WriteShort(status, data1, data2)\n\n status must be a valid MIDI status byte, for example:\n\n 0xCx = Program Change\n 0xBx = Controller Change\n 0x9x = Note On\n\n where x is the MIDI channel number 0 - 0xF.\n\n The data1 and data2 arguments are optional and assumed to be 0 if\n omitted.\n\n Example:\n\n Send note 65 on with velocity 100::\n\n WriteShort(0x90, 65, 100)\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2219 static PyObject *__pyx_pf_4pypm_6Output_WriteShort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2220 PyObject *__pyx_v_status = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2221 PyObject *__pyx_v_data1 = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2222 PyObject *__pyx_v_data2 = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2223 PmEvent __pyx_v_buffer[1];
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2224 PmError __pyx_v_err;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2225 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2226 PyObject *__pyx_t_1 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2227 PyObject *__pyx_t_2 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2228 PyObject *__pyx_t_3 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2229 PmMessage __pyx_t_4;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2230 int __pyx_t_5;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2231 int __pyx_t_6;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2232 static PyObject **__pyx_pyargnames[] = {&__pyx_kp_status,&__pyx_kp_1,&__pyx_kp_2,0};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2233 __Pyx_SetupRefcountContext("WriteShort");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2234 if (unlikely(__pyx_kwds)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2235 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2236 PyObject* values[3] = {0,0,0};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2237 values[1] = __pyx_int_0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2238 values[2] = __pyx_int_0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2239 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2240 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2241 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2242 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2243 case 0: break;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2244 default: goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2245 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2246 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2247 case 0:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2248 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_status);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2249 if (likely(values[0])) kw_args--;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2250 else goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2251 case 1:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2252 if (kw_args > 1) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2253 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2254 if (unlikely(value)) { values[1] = value; kw_args--; }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2255 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2256 case 2:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2257 if (kw_args > 1) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2258 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_2);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2259 if (unlikely(value)) { values[2] = value; kw_args--; }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2260 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2261 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2262 if (unlikely(kw_args > 0)) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2263 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "WriteShort") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2264 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2265 __pyx_v_status = values[0];
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2266 __pyx_v_data1 = values[1];
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2267 __pyx_v_data2 = values[2];
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2268 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2269 __pyx_v_data1 = __pyx_int_0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2270 __pyx_v_data2 = __pyx_int_0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2271 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2272 case 3: __pyx_v_data2 = PyTuple_GET_ITEM(__pyx_args, 2);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2273 case 2: __pyx_v_data1 = PyTuple_GET_ITEM(__pyx_args, 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2274 case 1: __pyx_v_status = PyTuple_GET_ITEM(__pyx_args, 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2275 break;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2276 default: goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2277 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2278 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2279 goto __pyx_L4_argument_unpacking_done;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2280 __pyx_L5_argtuple_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2281 __Pyx_RaiseArgtupleInvalid("WriteShort", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2282 __pyx_L3_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2283 __Pyx_AddTraceback("pypm.Output.WriteShort");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2284 return NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2285 __pyx_L4_argument_unpacking_done:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2286
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2287 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":456
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2288 * cdef PmError err
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2289 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2290 * self._check_open() # <<<<<<<<<<<<<<
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2291 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2292 * buffer[0].timestamp = Pt_Time()
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2293 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2294 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp__check_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2295 __Pyx_GOTREF(__pyx_t_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2296 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2297 __Pyx_GOTREF(__pyx_t_2);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2298 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2299 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2300
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2301 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":458
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2302 * self._check_open()
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2303 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2304 * buffer[0].timestamp = Pt_Time() # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2305 * buffer[0].message = (((data2 << 16) & 0xFF0000) |
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2306 * ((data1 << 8) & 0xFF00) | (status & 0xFF))
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2307 */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2308 (__pyx_v_buffer[0]).timestamp = Pt_Time();
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2309
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2310 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":459
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2311 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2312 * buffer[0].timestamp = Pt_Time()
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2313 * buffer[0].message = (((data2 << 16) & 0xFF0000) | # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2314 * ((data1 << 8) & 0xFF00) | (status & 0xFF))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2315 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2316 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2317 __pyx_t_2 = PyNumber_Lshift(__pyx_v_data2, __pyx_int_16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2318 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2319 __pyx_t_1 = PyNumber_And(__pyx_t_2, __pyx_int_0xFF0000); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2320 __Pyx_GOTREF(__pyx_t_1);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2321 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2322
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2323 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":460
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2324 * buffer[0].timestamp = Pt_Time()
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2325 * buffer[0].message = (((data2 << 16) & 0xFF0000) |
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2326 * ((data1 << 8) & 0xFF00) | (status & 0xFF)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2327 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2328 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2329 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2330 __pyx_t_2 = PyNumber_Lshift(__pyx_v_data1, __pyx_int_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2331 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2332 __pyx_t_3 = PyNumber_And(__pyx_t_2, __pyx_int_0xFF00); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2333 __Pyx_GOTREF(__pyx_t_3);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2334 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2335 __pyx_t_2 = PyNumber_Or(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2336 __Pyx_GOTREF(__pyx_t_2);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2337 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2338 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2339 __pyx_t_3 = PyNumber_And(__pyx_v_status, __pyx_int_0xFF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2340 __Pyx_GOTREF(__pyx_t_3);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2341 __pyx_t_1 = PyNumber_Or(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2342 __Pyx_GOTREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2343 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2344 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2345 __pyx_t_4 = __Pyx_PyInt_AsLong(__pyx_t_1); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2346 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2347
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2348 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":459
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2349 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2350 * buffer[0].timestamp = Pt_Time()
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2351 * buffer[0].message = (((data2 << 16) & 0xFF0000) | # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2352 * ((data1 << 8) & 0xFF00) | (status & 0xFF))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2353 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2354 */
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2355 (__pyx_v_buffer[0]).message = __pyx_t_4;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2356
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2357 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":462
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2358 * ((data1 << 8) & 0xFF00) | (status & 0xFF))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2359 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2360 * if self.debug: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2361 * print "Writing to MIDI buffer."
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2362 * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2363 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2364 __pyx_t_5 = ((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->debug;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2365 if (__pyx_t_5) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2366
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2367 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":463
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2368 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2369 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2370 * print "Writing to MIDI buffer." # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2371 * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2372 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2373 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2374 if (__Pyx_PrintOne(__pyx_kp_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2375 goto __pyx_L6;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2376 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2377 __pyx_L6:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2378
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2379 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":464
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2380 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2381 * print "Writing to MIDI buffer."
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2382 * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2383 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2384 * raise Exception(Pm_GetErrorText(err))
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2385 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2386 __pyx_v_err = Pm_Write(((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi, __pyx_v_buffer, 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2387
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2388 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":465
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2389 * print "Writing to MIDI buffer."
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2390 * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2391 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2392 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2393 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2394 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2395 __pyx_t_6 = (__pyx_v_err < 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2396 if (__pyx_t_6) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2397
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2398 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":466
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2399 * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2400 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2401 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2402 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2403 * def WriteSysEx(self, when, msg):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2404 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2405 __pyx_t_1 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2406 __Pyx_GOTREF(__pyx_t_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2407 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2408 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2409 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2410 __Pyx_GIVEREF(__pyx_t_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2411 __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2412 __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2413 __Pyx_GOTREF(__pyx_t_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2414 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2415 __Pyx_Raise(__pyx_t_1, 0, 0);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2416 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2417 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2418 goto __pyx_L7;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2419 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2420 __pyx_L7:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2421
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2422 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2423 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2424 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2425 __Pyx_XDECREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2426 __Pyx_XDECREF(__pyx_t_2);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2427 __Pyx_XDECREF(__pyx_t_3);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2428 __Pyx_AddTraceback("pypm.Output.WriteShort");
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2429 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2430 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2431 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2432 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2433 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2434 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2435
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2436 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":468
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2437 * raise Exception(Pm_GetErrorText(err))
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2438 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2439 * def WriteSysEx(self, when, msg): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2440 * """Output a timestamped system-exclusive MIDI message on this device.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2441 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2442 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2443
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2444 static PyObject *__pyx_pf_4pypm_6Output_WriteSysEx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2445 static char __pyx_doc_4pypm_6Output_WriteSysEx[] = "Output a timestamped system-exclusive MIDI message on this device.\n\n Usage::\n\n WriteSysEx(<timestamp>, <msg>)\n\n <msg> can be a *list* or a *string*\n\n Example (assuming 'out' is an output MIDI stream):\n\n out.WriteSysEx(0, '\\xF0\\x7D\\x10\\x11\\x12\\x13\\xF7')\n\n This is equivalent to::\n\n out.WriteSysEx(pypm.Time(),\n [0xF0, 0x7D, 0x10, 0x11, 0x12, 0x13, 0xF7])\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2446 static PyObject *__pyx_pf_4pypm_6Output_WriteSysEx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2447 PyObject *__pyx_v_when = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2448 PyObject *__pyx_v_msg = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2449 PmError __pyx_v_err;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2450 char *__pyx_v_cmsg;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2451 PtTimestamp __pyx_v_cur_time;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2452 PyObject *__pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2453 PyObject *__pyx_1 = 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2454 PyObject *__pyx_t_1 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2455 PyObject *__pyx_t_2 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2456 int __pyx_t_3;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2457 PyObject *__pyx_t_4 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2458 char *__pyx_t_5;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2459 PmTimestamp __pyx_t_6;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2460 static PyObject **__pyx_pyargnames[] = {&__pyx_kp_when,&__pyx_kp_msg,0};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2461 __Pyx_SetupRefcountContext("WriteSysEx");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2462 if (unlikely(__pyx_kwds)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2463 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2464 PyObject* values[2] = {0,0};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2465 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2466 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2467 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2468 case 0: break;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2469 default: goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2470 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2471 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2472 case 0:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2473 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_when);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2474 if (likely(values[0])) kw_args--;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2475 else goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2476 case 1:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2477 values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_msg);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2478 if (likely(values[1])) kw_args--;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2479 else {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2480 __Pyx_RaiseArgtupleInvalid("WriteSysEx", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2481 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2482 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2483 if (unlikely(kw_args > 0)) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2484 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "WriteSysEx") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2485 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2486 __pyx_v_when = values[0];
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2487 __pyx_v_msg = values[1];
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2488 } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2489 goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2490 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2491 __pyx_v_when = PyTuple_GET_ITEM(__pyx_args, 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2492 __pyx_v_msg = PyTuple_GET_ITEM(__pyx_args, 1);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2493 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2494 goto __pyx_L4_argument_unpacking_done;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2495 __pyx_L5_argtuple_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2496 __Pyx_RaiseArgtupleInvalid("WriteSysEx", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2497 __pyx_L3_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2498 __Pyx_AddTraceback("pypm.Output.WriteSysEx");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2499 return NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2500 __pyx_L4_argument_unpacking_done:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2501 __Pyx_INCREF(__pyx_v_msg);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2502
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2503 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":491
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2504 * cdef PtTimestamp cur_time
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2505 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2506 * self._check_open() # <<<<<<<<<<<<<<
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2507 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2508 * if type(msg) is list:
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2509 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2510 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp__check_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2511 __Pyx_GOTREF(__pyx_t_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2512 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2513 __Pyx_GOTREF(__pyx_t_2);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2514 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2515 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2516
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2517 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":493
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2518 * self._check_open()
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2519 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2520 * if type(msg) is list: # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2521 * # Markus Pfaff contribution
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2522 * msg = array.array('B', msg).tostring()
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2523 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2524 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2525 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2526 __Pyx_INCREF(__pyx_v_msg);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2527 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2528 __Pyx_GIVEREF(__pyx_v_msg);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2529 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyType_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2530 __Pyx_GOTREF(__pyx_t_1);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2531 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2532 __pyx_t_3 = (__pyx_t_1 == ((PyObject *)((PyObject*)&PyList_Type)));
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2533 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2534 if (__pyx_t_3) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2535
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2536 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":495
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2537 * if type(msg) is list:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2538 * # Markus Pfaff contribution
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2539 * msg = array.array('B', msg).tostring() # <<<<<<<<<<<<<<
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2540 * cmsg = msg
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2541 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2542 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2543 __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_array); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2544 __Pyx_GOTREF(__pyx_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2545 __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2546 __Pyx_GOTREF(__pyx_t_1);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2547 __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2548 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2549 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2550 __Pyx_INCREF(__pyx_kp_18);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2551 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_18);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2552 __Pyx_GIVEREF(__pyx_kp_18);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2553 __Pyx_INCREF(__pyx_v_msg);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2554 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_msg);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2555 __Pyx_GIVEREF(__pyx_v_msg);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2556 __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2557 __Pyx_GOTREF(__pyx_t_4);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2558 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2559 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2560 __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_kp_tostring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2561 __Pyx_GOTREF(__pyx_t_2);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2562 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2563 __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2564 __Pyx_GOTREF(__pyx_t_4);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2565 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2566 __Pyx_DECREF(__pyx_v_msg);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2567 __pyx_v_msg = __pyx_t_4;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2568 __pyx_t_4 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2569 goto __pyx_L6;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2570 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2571 __pyx_L6:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2572
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2573 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":496
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2574 * # Markus Pfaff contribution
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2575 * msg = array.array('B', msg).tostring()
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2576 * cmsg = msg # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2577 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2578 * cur_time = Pt_Time()
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2579 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2580 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_msg); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2581 __pyx_v_cmsg = __pyx_t_5;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2582
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2583 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":498
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2584 * cmsg = msg
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2585 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2586 * cur_time = Pt_Time() # <<<<<<<<<<<<<<
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2587 * err = Pm_WriteSysEx(self.midi, when, <unsigned char *> cmsg)
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2588 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2589 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2590 __pyx_v_cur_time = Pt_Time();
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2591
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2592 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":499
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2593 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2594 * cur_time = Pt_Time()
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2595 * err = Pm_WriteSysEx(self.midi, when, <unsigned char *> cmsg) # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2596 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2597 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2598 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2599 __pyx_t_6 = __Pyx_PyInt_AsLong(__pyx_v_when); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2600 __pyx_v_err = Pm_WriteSysEx(((struct __pyx_obj_4pypm_Output *)__pyx_v_self)->midi, __pyx_t_6, ((unsigned char *)__pyx_v_cmsg));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2601
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2602 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":500
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2603 * cur_time = Pt_Time()
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2604 * err = Pm_WriteSysEx(self.midi, when, <unsigned char *> cmsg)
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2605 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2606 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2607 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2608 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2609 __pyx_t_3 = (__pyx_v_err < 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2610 if (__pyx_t_3) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2611
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2612 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":501
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2613 * err = Pm_WriteSysEx(self.midi, when, <unsigned char *> cmsg)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2614 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2615 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2616 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2617 * # wait for SysEx to go thru or...
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2618 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2619 __pyx_t_4 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2620 __Pyx_GOTREF(__pyx_t_4);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2621 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2622 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2623 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2624 __Pyx_GIVEREF(__pyx_t_4);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2625 __pyx_t_4 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2626 __pyx_t_4 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2627 __Pyx_GOTREF(__pyx_t_4);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2628 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2629 __Pyx_Raise(__pyx_t_4, 0, 0);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2630 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2631 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2632 goto __pyx_L7;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2633 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2634 __pyx_L7:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2635
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2636 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":505
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2637 * # wait for SysEx to go thru or...
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2638 * # my win32 machine crashes w/ multiple SysEx
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2639 * while Pt_Time() == cur_time: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2640 * pass
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2641 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2642 */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2643 while (1) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2644 __pyx_t_3 = (Pt_Time() == __pyx_v_cur_time);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2645 if (!__pyx_t_3) break;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2646 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2647
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2648 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2649 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2650 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2651 __Pyx_XDECREF(__pyx_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2652 __Pyx_XDECREF(__pyx_t_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2653 __Pyx_XDECREF(__pyx_t_2);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2654 __Pyx_XDECREF(__pyx_t_4);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2655 __Pyx_AddTraceback("pypm.Output.WriteSysEx");
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2656 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2657 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2658 __Pyx_DECREF(__pyx_v_msg);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2659 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2660 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2661 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2662 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2663
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2664 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":521
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2665 * cdef int debug
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2666 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2667 * def __init__(self, input_device, buffersize=4096): # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2668 * """Instantiate MIDI input stream object."""
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2669 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2670 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2671
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2672 static int __pyx_pf_4pypm_5Input___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2673 static char __pyx_doc_4pypm_5Input___init__[] = "Instantiate MIDI input stream object.";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2674 static int __pyx_pf_4pypm_5Input___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2675 PyObject *__pyx_v_input_device = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2676 PyObject *__pyx_v_buffersize = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2677 PmError __pyx_v_err;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2678 int __pyx_r;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2679 int __pyx_t_1;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2680 PmDeviceID __pyx_t_2;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2681 long __pyx_t_3;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2682 int __pyx_t_4;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2683 PyObject *__pyx_t_5 = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2684 PyObject *__pyx_t_6 = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2685 static PyObject **__pyx_pyargnames[] = {&__pyx_kp_input_device,&__pyx_kp_buffersize,0};
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2686 __Pyx_SetupRefcountContext("__init__");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2687 if (unlikely(__pyx_kwds)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2688 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2689 PyObject* values[2] = {0,0};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2690 values[1] = __pyx_int_4096;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2691 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2692 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2693 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2694 case 0: break;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2695 default: goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2696 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2697 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2698 case 0:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2699 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_input_device);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2700 if (likely(values[0])) kw_args--;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2701 else goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2702 case 1:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2703 if (kw_args > 1) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2704 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_buffersize);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2705 if (unlikely(value)) { values[1] = value; kw_args--; }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2706 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2707 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2708 if (unlikely(kw_args > 0)) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2709 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2710 }
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2711 __pyx_v_input_device = values[0];
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2712 __pyx_v_buffersize = values[1];
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2713 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2714 __pyx_v_buffersize = __pyx_int_4096;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2715 switch (PyTuple_GET_SIZE(__pyx_args)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2716 case 2: __pyx_v_buffersize = PyTuple_GET_ITEM(__pyx_args, 1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2717 case 1: __pyx_v_input_device = PyTuple_GET_ITEM(__pyx_args, 0);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2718 break;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2719 default: goto __pyx_L5_argtuple_error;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2720 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2721 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2722 goto __pyx_L4_argument_unpacking_done;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2723 __pyx_L5_argtuple_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2724 __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2725 __pyx_L3_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2726 __Pyx_AddTraceback("pypm.Input.__init__");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2727 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2728 __pyx_L4_argument_unpacking_done:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2729
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2730 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":525
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2731 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2732 * cdef PmError err
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2733 * self.device = input_device # <<<<<<<<<<<<<<
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2734 * self.debug = 0
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2735 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2736 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2737 __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_input_device); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2738 ((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->device = __pyx_t_1;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2739
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2740 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":526
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2741 * cdef PmError err
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2742 * self.device = input_device
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2743 * self.debug = 0 # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2744 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2745 * err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize,
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2746 */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2747 ((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->debug = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2748
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2749 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":528
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2750 * self.debug = 0
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2751 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2752 * err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize, # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2753 * &Pt_Time, NULL)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2754 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2755 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2756 __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_v_input_device); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2757 __pyx_t_3 = __Pyx_PyInt_AsLong(__pyx_v_buffersize); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2758
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2759 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":529
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2760 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2761 * err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2762 * &Pt_Time, NULL) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2763 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2764 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2765 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2766 __pyx_v_err = Pm_OpenInput((&((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi), __pyx_t_2, NULL, __pyx_t_3, (&Pt_Time), NULL);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2767
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2768 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":530
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2769 * err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2770 * &Pt_Time, NULL)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2771 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2772 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2773 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2774 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2775 __pyx_t_4 = (__pyx_v_err < 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2776 if (__pyx_t_4) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2777
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2778 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":531
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2779 * &Pt_Time, NULL)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2780 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2781 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2782 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2783 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2784 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2785 __pyx_t_5 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2786 __Pyx_GOTREF(__pyx_t_5);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2787 __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2788 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2789 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2790 __Pyx_GIVEREF(__pyx_t_5);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2791 __pyx_t_5 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2792 __pyx_t_5 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2793 __Pyx_GOTREF(__pyx_t_5);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2794 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2795 __Pyx_Raise(__pyx_t_5, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2796 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2797 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2798 goto __pyx_L6;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2799 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2800 __pyx_L6:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2801
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2802 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":533
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2803 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2804 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2805 * if self.debug: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2806 * print "MIDI input opened."
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2807 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2808 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2809 __pyx_t_1 = ((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->debug;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2810 if (__pyx_t_1) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2811
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2812 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":534
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2813 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2814 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2815 * print "MIDI input opened." # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2816 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2817 * def __dealloc__(self):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2818 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2819 if (__Pyx_PrintOne(__pyx_kp_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2820 goto __pyx_L7;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2821 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2822 __pyx_L7:;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2823
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2824 __pyx_r = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2825 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2826 __pyx_L1_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2827 __Pyx_XDECREF(__pyx_t_5);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2828 __Pyx_XDECREF(__pyx_t_6);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2829 __Pyx_AddTraceback("pypm.Input.__init__");
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2830 __pyx_r = -1;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2831 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2832 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2833 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2834 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2835
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2836 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":536
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2837 * print "MIDI input opened."
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2838 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2839 * def __dealloc__(self): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2840 * """Close midi device if still open when the instance is destroyed."""
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2841 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2842 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2843
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2844 static void __pyx_pf_4pypm_5Input___dealloc__(PyObject *__pyx_v_self); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2845 static char __pyx_doc_4pypm_5Input___dealloc__[] = "Close midi device if still open when the instance is destroyed.";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2846 static void __pyx_pf_4pypm_5Input___dealloc__(PyObject *__pyx_v_self) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2847 PmError __pyx_v_err;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2848 int __pyx_t_1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2849 int __pyx_t_2;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2850 PyObject *__pyx_t_3 = NULL;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2851 PyObject *__pyx_t_4 = NULL;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2852 __Pyx_SetupRefcountContext("__dealloc__");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2853
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2854 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":541
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2855 * cdef PmError err
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2856 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2857 * if self.debug: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2858 * print "Closing MIDI input stream and destroying instance"
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2859 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2860 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2861 __pyx_t_1 = ((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->debug;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2862 if (__pyx_t_1) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2863
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2864 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":542
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2865 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2866 * if self.debug:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2867 * print "Closing MIDI input stream and destroying instance" # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2868 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2869 * if self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2870 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2871 if (__Pyx_PrintOne(__pyx_kp_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2872 goto __pyx_L5;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2873 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2874 __pyx_L5:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2875
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2876 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":544
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2877 * print "Closing MIDI input stream and destroying instance"
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2878 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2879 * if self.midi: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2880 * err = Pm_Close(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2881 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2882 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2883 __pyx_t_2 = (((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi != 0);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2884 if (__pyx_t_2) {
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2885
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2886 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":545
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2887 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2888 * if self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2889 * err = Pm_Close(self.midi) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2890 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2891 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2892 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2893 __pyx_v_err = Pm_Close(((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2894
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2895 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":546
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2896 * if self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2897 * err = Pm_Close(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2898 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2899 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2900 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2901 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2902 __pyx_t_2 = (__pyx_v_err < 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2903 if (__pyx_t_2) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2904
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2905 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":547
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2906 * err = Pm_Close(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2907 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2908 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2909 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2910 * def _check_open(self):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2911 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2912 __pyx_t_3 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2913 __Pyx_GOTREF(__pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2914 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2915 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2916 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2917 __Pyx_GIVEREF(__pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2918 __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2919 __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2920 __Pyx_GOTREF(__pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2921 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2922 __Pyx_Raise(__pyx_t_3, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2923 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2924 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2925 goto __pyx_L7;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2926 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2927 __pyx_L7:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2928 goto __pyx_L6;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2929 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2930 __pyx_L6:;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2931
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2932 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2933 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2934 __Pyx_XDECREF(__pyx_t_3);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2935 __Pyx_XDECREF(__pyx_t_4);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2936 __Pyx_AddTraceback("pypm.Input.__dealloc__");
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2937 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
2938 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2939 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
2940
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2941 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":549
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2942 * raise Exception(Pm_GetErrorText(err))
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2943 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2944 * def _check_open(self): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2945 * """Check whether midi device is open, and if not, raises an error.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2946 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2947 */
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2948
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2949 static PyObject *__pyx_pf_4pypm_5Input__check_open(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2950 static char __pyx_doc_4pypm_5Input__check_open[] = "Check whether midi device is open, and if not, raises an error.\n\n Internal method, should be used only by other methods of this class.\n\n ";
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2951 static PyObject *__pyx_pf_4pypm_5Input__check_open(PyObject *__pyx_v_self, PyObject *unused) {
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2952 PyObject *__pyx_r = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2953 int __pyx_t_1;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2954 PyObject *__pyx_t_2 = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2955 PyObject *__pyx_t_3 = NULL;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2956 __Pyx_SetupRefcountContext("_check_open");
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2957
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2958 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":555
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2959 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2960 * """
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2961 * if self.midi == NULL: # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2962 * raise Exception("midi Input not open.")
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2963 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2964 */
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2965 __pyx_t_1 = (((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi == NULL);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2966 if (__pyx_t_1) {
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2967
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2968 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":556
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2969 * """
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2970 * if self.midi == NULL:
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2971 * raise Exception("midi Input not open.") # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2972 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2973 * def Close(self):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2974 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2975 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2976 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2977 __Pyx_INCREF(__pyx_kp_21);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2978 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_21);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2979 __Pyx_GIVEREF(__pyx_kp_21);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2980 __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2981 __Pyx_GOTREF(__pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2982 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2983 __Pyx_Raise(__pyx_t_3, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2984 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2985 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2986 goto __pyx_L5;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2987 }
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2988 __pyx_L5:;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2989
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2990 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2991 goto __pyx_L0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2992 __pyx_L1_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2993 __Pyx_XDECREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
2994 __Pyx_XDECREF(__pyx_t_3);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2995 __Pyx_AddTraceback("pypm.Input._check_open");
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2996 __pyx_r = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2997 __pyx_L0:;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2998 __Pyx_XGIVEREF(__pyx_r);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
2999 __Pyx_FinishRefcountContext();
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3000 return __pyx_r;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3001 }
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3002
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3003 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":558
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3004 * raise Exception("midi Input not open.")
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3005 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3006 * def Close(self): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3007 * """Close the midi input device.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3008 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3009 */
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3010
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3011 static PyObject *__pyx_pf_4pypm_5Input_Close(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3012 static char __pyx_doc_4pypm_5Input_Close[] = "Close the midi input device.\n\n PortMidi attempts to close open streams when the application exits --\n this is particularly difficult under Windows, so it is best to take\n care to close all devices explicitly.\n\n ";
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3013 static PyObject *__pyx_pf_4pypm_5Input_Close(PyObject *__pyx_v_self, PyObject *unused) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3014 PmError __pyx_v_err;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3015 PyObject *__pyx_r = NULL;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3016 int __pyx_t_1;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3017 PyObject *__pyx_t_2 = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3018 PyObject *__pyx_t_3 = NULL;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3019 __Pyx_SetupRefcountContext("Close");
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3020
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3021 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":568
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3022 * cdef PmError err
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3023 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3024 * if not self.midi: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3025 * return
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3026 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3027 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3028 __pyx_t_1 = (!(((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi != 0));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3029 if (__pyx_t_1) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3030
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3031 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":569
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3032 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3033 * if not self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3034 * return # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3035 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3036 * if self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3037 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3038 __Pyx_XDECREF(__pyx_r);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3039 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3040 goto __pyx_L0;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3041 goto __pyx_L5;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3042 }
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3043 __pyx_L5:;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3044
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3045 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":571
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3046 * return
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3047 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3048 * if self.midi: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3049 * err = Pm_Close(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3050 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3051 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3052 __pyx_t_1 = (((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi != 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3053 if (__pyx_t_1) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3054
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3055 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":572
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3056 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3057 * if self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3058 * err = Pm_Close(self.midi) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3059 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3060 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3061 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3062 __pyx_v_err = Pm_Close(((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3063
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3064 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":573
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3065 * if self.midi:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3066 * err = Pm_Close(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3067 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3068 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3069 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3070 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3071 __pyx_t_1 = (__pyx_v_err < 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3072 if (__pyx_t_1) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3073
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3074 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":574
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3075 * err = Pm_Close(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3076 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3077 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3078 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3079 * self.midi = NULL
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3080 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3081 __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3082 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3083 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3084 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3085 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3086 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3087 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3088 __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3089 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3090 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3091 __Pyx_Raise(__pyx_t_2, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3092 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3093 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3094 goto __pyx_L7;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3095 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3096 __pyx_L7:;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3097 goto __pyx_L6;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3098 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3099 __pyx_L6:;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3100
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3101 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":576
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3102 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3103 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3104 * self.midi = NULL # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3105 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3106 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3107 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3108 ((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi = NULL;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3109
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3110 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3111 goto __pyx_L0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3112 __pyx_L1_error:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3113 __Pyx_XDECREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3114 __Pyx_XDECREF(__pyx_t_3);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3115 __Pyx_AddTraceback("pypm.Input.Close");
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3116 __pyx_r = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3117 __pyx_L0:;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3118 __Pyx_XGIVEREF(__pyx_r);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3119 __Pyx_FinishRefcountContext();
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3120 return __pyx_r;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3121 }
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3122
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3123 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":579
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3124 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3125 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3126 * def SetFilter(self, filters): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3127 * """Set filters on an open input stream.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3128 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3129 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3130
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3131 static PyObject *__pyx_pf_4pypm_5Input_SetFilter(PyObject *__pyx_v_self, PyObject *__pyx_v_filters); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3132 static char __pyx_doc_4pypm_5Input_SetFilter[] = "Set filters on an open input stream.\n\n Usage::\n\n input.SetFilter(filters)\n\n Filters are used to drop selected input event types. By default, only\n active sensing messages are filtered. To prohibit, say, active sensing\n and sysex messages, call\n\n ::\n\n input.SetFilter(FILT_ACTIVE | FILT_SYSEX);\n\n Filtering is useful when midi routing or midi thru functionality is\n being provided by the user application. For example, you may want to\n exclude timing messages (clock, MTC, start/stop/continue), while\n allowing note-related messages to pass. Or you may be using a sequencer\n or drum-machine for MIDI clock information but want to exclude any\n notes it may play.\n\n .. note::\n SetFilter empties the buffer after setting the filter,\n just in case anything got through.\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3133 static PyObject *__pyx_pf_4pypm_5Input_SetFilter(PyObject *__pyx_v_self, PyObject *__pyx_v_filters) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3134 PmEvent __pyx_v_buffer[1];
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3135 PmError __pyx_v_err;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3136 PyObject *__pyx_r = NULL;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3137 PyObject *__pyx_t_1 = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3138 PyObject *__pyx_t_2 = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3139 long __pyx_t_3;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3140 int __pyx_t_4;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3141 __Pyx_SetupRefcountContext("SetFilter");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3142
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3143 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":609
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3144 * cdef PmError err
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3145 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3146 * self._check_open() # <<<<<<<<<<<<<<
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3147 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3148 * err = Pm_SetFilter(self.midi, filters)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3149 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3150 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp__check_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3151 __Pyx_GOTREF(__pyx_t_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3152 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3153 __Pyx_GOTREF(__pyx_t_2);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3154 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3155 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3156
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3157 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":611
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3158 * self._check_open()
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3159 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3160 * err = Pm_SetFilter(self.midi, filters) # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3161 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3162 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3163 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3164 __pyx_t_3 = __Pyx_PyInt_AsLong(__pyx_v_filters); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3165 __pyx_v_err = Pm_SetFilter(((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi, __pyx_t_3);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3166
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3167 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":613
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3168 * err = Pm_SetFilter(self.midi, filters)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3169 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3170 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3171 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3172 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3173 */
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3174 __pyx_t_4 = (__pyx_v_err < 0);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3175 if (__pyx_t_4) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3176
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3177 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":614
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3178 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3179 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3180 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3181 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3182 * while(Pm_Poll(self.midi) != pmNoError):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3183 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3184 __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3185 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3186 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3187 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3188 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3189 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3190 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3191 __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3192 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3193 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3194 __Pyx_Raise(__pyx_t_2, 0, 0);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3195 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3196 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3197 goto __pyx_L5;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3198 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3199 __pyx_L5:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3200
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3201 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":616
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3202 * raise Exception(Pm_GetErrorText(err))
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3203 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3204 * while(Pm_Poll(self.midi) != pmNoError): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3205 * err = Pm_Read(self.midi, buffer, 1)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3206 * if err < 0:
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3207 */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3208 while (1) {
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3209 __pyx_t_4 = (Pm_Poll(((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi) != pmNoError);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3210 if (!__pyx_t_4) break;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3211
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3212 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":617
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3213 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3214 * while(Pm_Poll(self.midi) != pmNoError):
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3215 * err = Pm_Read(self.midi, buffer, 1) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3216 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3217 * raise Exception(Pm_GetErrorText(err))
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3218 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3219 __pyx_v_err = Pm_Read(((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi, __pyx_v_buffer, 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3220
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3221 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":618
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3222 * while(Pm_Poll(self.midi) != pmNoError):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3223 * err = Pm_Read(self.midi, buffer, 1)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3224 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3225 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3226 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3227 */
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3228 __pyx_t_4 = (__pyx_v_err < 0);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3229 if (__pyx_t_4) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3230
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3231 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":619
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3232 * err = Pm_Read(self.midi, buffer, 1)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3233 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3234 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3235 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3236 * def SetChannelMask(self, mask):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3237 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3238 __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3239 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3240 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3241 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3242 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3243 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3244 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3245 __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3246 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3247 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3248 __Pyx_Raise(__pyx_t_2, 0, 0);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3249 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3250 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3251 goto __pyx_L8;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3252 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3253 __pyx_L8:;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3254 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3255
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3256 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3257 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3258 __pyx_L1_error:;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3259 __Pyx_XDECREF(__pyx_t_1);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3260 __Pyx_XDECREF(__pyx_t_2);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3261 __Pyx_AddTraceback("pypm.Input.SetFilter");
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3262 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3263 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3264 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3265 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3266 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3267 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3268
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3269 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":621
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3270 * raise Exception(Pm_GetErrorText(err))
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3271 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3272 * def SetChannelMask(self, mask): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3273 * """Set channel mask to filter incoming messages based on channel.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3274 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3275 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3276
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3277 static PyObject *__pyx_pf_4pypm_5Input_SetChannelMask(PyObject *__pyx_v_self, PyObject *__pyx_v_mask); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3278 static char __pyx_doc_4pypm_5Input_SetChannelMask[] = "Set channel mask to filter incoming messages based on channel.\n\n The mask is a 16-bit bitfield corresponding to appropriate channels\n Channel(<channel>) can assist in calling this function, i.e. to\n receive only input on channel 1, call this method like this::\n\n SetChannelMask(Channel(1))\n\n Multiple channels should be OR'd together::\n\n SetChannelMask(Channel(10) | Channel(11))\n\n .. note::\n The PyPortMidi Channel function has been altered from the original\n PortMidi C call to correct for what seems to be a bug --- i.e.\n channel filters were all numbered from 0 to 15 instead of 1 to 16.\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3279 static PyObject *__pyx_pf_4pypm_5Input_SetChannelMask(PyObject *__pyx_v_self, PyObject *__pyx_v_mask) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3280 PmError __pyx_v_err;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3281 PyObject *__pyx_r = NULL;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3282 PyObject *__pyx_t_1 = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3283 PyObject *__pyx_t_2 = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3284 int __pyx_t_3;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3285 int __pyx_t_4;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3286 __Pyx_SetupRefcountContext("SetChannelMask");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3287
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3288 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":642
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3289 * cdef PmError err
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3290 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3291 * self._check_open() # <<<<<<<<<<<<<<
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3292 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3293 * err = Pm_SetChannelMask(self.midi, mask)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3294 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3295 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp__check_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3296 __Pyx_GOTREF(__pyx_t_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3297 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3298 __Pyx_GOTREF(__pyx_t_2);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3299 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3300 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3301
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3302 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":644
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3303 * self._check_open()
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3304 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3305 * err = Pm_SetChannelMask(self.midi, mask) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3306 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3307 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3308 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3309 __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_v_mask); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3310 __pyx_v_err = Pm_SetChannelMask(((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi, __pyx_t_3);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3311
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3312 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":645
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3313 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3314 * err = Pm_SetChannelMask(self.midi, mask)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3315 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3316 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3317 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3318 */
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3319 __pyx_t_4 = (__pyx_v_err < 0);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3320 if (__pyx_t_4) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3321
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3322 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":646
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3323 * err = Pm_SetChannelMask(self.midi, mask)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3324 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3325 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3326 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3327 * def Poll(self):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3328 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3329 __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3330 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3331 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3332 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3333 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3334 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3335 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3336 __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3337 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3338 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3339 __Pyx_Raise(__pyx_t_2, 0, 0);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3340 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3341 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3342 goto __pyx_L5;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3343 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3344 __pyx_L5:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3345
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3346 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3347 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3348 __pyx_L1_error:;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3349 __Pyx_XDECREF(__pyx_t_1);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3350 __Pyx_XDECREF(__pyx_t_2);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3351 __Pyx_AddTraceback("pypm.Input.SetChannelMask");
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3352 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3353 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3354 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3355 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3356 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3357 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3358
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3359 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":648
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3360 * raise Exception(Pm_GetErrorText(err))
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3361 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3362 * def Poll(self): # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3363 * """Test whether input is available.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3364 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3365 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3366
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3367 static PyObject *__pyx_pf_4pypm_5Input_Poll(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3368 static char __pyx_doc_4pypm_5Input_Poll[] = "Test whether input is available.\n\n Returns TRUE if input can be read, FALSE otherwise, or an error value.\n\n ";
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3369 static PyObject *__pyx_pf_4pypm_5Input_Poll(PyObject *__pyx_v_self, PyObject *unused) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3370 PmError __pyx_v_err;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3371 PyObject *__pyx_r = NULL;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3372 PyObject *__pyx_t_1 = NULL;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3373 PyObject *__pyx_t_2 = NULL;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3374 int __pyx_t_3;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3375 __Pyx_SetupRefcountContext("Poll");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3376
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3377 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":656
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3378 * cdef PmError err
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3379 *
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3380 * self._check_open() # <<<<<<<<<<<<<<
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3381 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3382 * err = Pm_Poll(self.midi)
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3383 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3384 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp__check_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3385 __Pyx_GOTREF(__pyx_t_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3386 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3387 __Pyx_GOTREF(__pyx_t_2);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3388 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3389 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3390
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3391 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":658
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3392 * self._check_open()
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3393 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3394 * err = Pm_Poll(self.midi) # <<<<<<<<<<<<<<
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3395 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3396 * raise Exception(Pm_GetErrorText(err))
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3397 */
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3398 __pyx_v_err = Pm_Poll(((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3399
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3400 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":659
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3401 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3402 * err = Pm_Poll(self.midi)
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3403 * if err < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3404 * raise Exception(Pm_GetErrorText(err))
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3405 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3406 */
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3407 __pyx_t_3 = (__pyx_v_err < 0);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3408 if (__pyx_t_3) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3409
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3410 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":660
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3411 * err = Pm_Poll(self.midi)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3412 * if err < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3413 * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3414 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3415 * return err
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3416 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3417 __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3418 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3419 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3420 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3421 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3422 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3423 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3424 __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3425 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3426 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3427 __Pyx_Raise(__pyx_t_2, 0, 0);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3428 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3429 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3430 goto __pyx_L5;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3431 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3432 __pyx_L5:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3433
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3434 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":662
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3435 * raise Exception(Pm_GetErrorText(err))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3436 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3437 * return err # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3438 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3439 * def Read(self, max_events):
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3440 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3441 __Pyx_XDECREF(__pyx_r);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3442 __pyx_t_2 = PyInt_FromLong(__pyx_v_err); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3443 __Pyx_GOTREF(__pyx_t_2);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3444 __pyx_r = __pyx_t_2;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3445 __pyx_t_2 = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3446 goto __pyx_L0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3447
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3448 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3449 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3450 __pyx_L1_error:;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3451 __Pyx_XDECREF(__pyx_t_1);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3452 __Pyx_XDECREF(__pyx_t_2);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3453 __Pyx_AddTraceback("pypm.Input.Poll");
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3454 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3455 __pyx_L0:;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3456 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3457 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3458 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3459 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3460
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3461 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":664
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3462 * return err
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3463 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3464 * def Read(self, max_events): # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3465 * """Read and return up to max_events events from input.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3466 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3467 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3468
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3469 static PyObject *__pyx_pf_4pypm_5Input_Read(PyObject *__pyx_v_self, PyObject *__pyx_v_max_events); /*proto*/
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3470 static char __pyx_doc_4pypm_5Input_Read[] = "Read and return up to max_events events from input.\n\n Reads up to max_events midi events stored in the input buffer and\n returns them as a list in the following form::\n\n [\n [[status, data1, data2, data3], timestamp],\n [[status, data1, data2, data3], timestamp],\n ...\n ]\n\n ";
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3471 static PyObject *__pyx_pf_4pypm_5Input_Read(PyObject *__pyx_v_self, PyObject *__pyx_v_max_events) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3472 PmEvent __pyx_v_buffer[1024];
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3473 PmError __pyx_v_num_events;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3474 PyObject *__pyx_v_events;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3475 PyObject *__pyx_v_ev_no;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3476 PyObject *__pyx_r = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3477 PyObject *__pyx_t_1 = NULL;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3478 PyObject *__pyx_t_2 = NULL;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3479 int __pyx_t_3;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3480 int __pyx_t_4;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3481 long __pyx_t_5;
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3482 Py_ssize_t __pyx_t_6;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3483 Py_ssize_t __pyx_t_7;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3484 PyObject *__pyx_t_8 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3485 PyObject *__pyx_t_9 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3486 PyObject *__pyx_t_10 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3487 PyObject *__pyx_t_11 = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3488 __Pyx_SetupRefcountContext("Read");
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3489 __pyx_v_events = Py_None; __Pyx_INCREF(Py_None);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3490 __pyx_v_ev_no = Py_None; __Pyx_INCREF(Py_None);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3491
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3492 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":680
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3493 * cdef PmError num_events
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3494 *
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3495 * self._check_open() # <<<<<<<<<<<<<<
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3496 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3497 * if max_events > 1024:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3498 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3499 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp__check_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3500 __Pyx_GOTREF(__pyx_t_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3501 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3502 __Pyx_GOTREF(__pyx_t_2);
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3503 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3504 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3505
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3506 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":682
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3507 * self._check_open()
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3508 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3509 * if max_events > 1024: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3510 * raise ValueError('Maximum buffer length is 1024.')
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3511 * if not max_events:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3512 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3513 __pyx_t_2 = PyObject_RichCompare(__pyx_v_max_events, __pyx_int_1024, Py_GT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3514 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3515 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3516 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3517 if (__pyx_t_3) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3518
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3519 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":683
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3520 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3521 * if max_events > 1024:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3522 * raise ValueError('Maximum buffer length is 1024.') # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3523 * if not max_events:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3524 * raise ValueError('Minimum buffer length is 1.')
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3525 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3526 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3527 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3528 __Pyx_INCREF(__pyx_kp_22);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3529 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_22);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3530 __Pyx_GIVEREF(__pyx_kp_22);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3531 __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3532 __Pyx_GOTREF(__pyx_t_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3533 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3534 __Pyx_Raise(__pyx_t_1, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3535 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3536 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3537 goto __pyx_L5;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3538 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3539 __pyx_L5:;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3540
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3541 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":684
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3542 * if max_events > 1024:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3543 * raise ValueError('Maximum buffer length is 1024.')
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3544 * if not max_events: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3545 * raise ValueError('Minimum buffer length is 1.')
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3546 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3547 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3548 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_max_events); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3549 __pyx_t_4 = (!__pyx_t_3);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3550 if (__pyx_t_4) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3551
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3552 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":685
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3553 * raise ValueError('Maximum buffer length is 1024.')
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3554 * if not max_events:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3555 * raise ValueError('Minimum buffer length is 1.') # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3556 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3557 * num_events = Pm_Read(self.midi, buffer, max_events)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3558 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3559 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3560 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3561 __Pyx_INCREF(__pyx_kp_23);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3562 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_23);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3563 __Pyx_GIVEREF(__pyx_kp_23);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3564 __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3565 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3566 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3567 __Pyx_Raise(__pyx_t_2, 0, 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3568 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3569 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3570 goto __pyx_L6;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3571 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3572 __pyx_L6:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3573
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3574 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":687
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3575 * raise ValueError('Minimum buffer length is 1.')
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3576 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3577 * num_events = Pm_Read(self.midi, buffer, max_events) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3578 * if num_events < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3579 * raise Exception(Pm_GetErrorText(num_events))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3580 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3581 __pyx_t_5 = __Pyx_PyInt_AsLong(__pyx_v_max_events); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3582 __pyx_v_num_events = Pm_Read(((struct __pyx_obj_4pypm_Input *)__pyx_v_self)->midi, __pyx_v_buffer, __pyx_t_5);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3583
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3584 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":688
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3585 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3586 * num_events = Pm_Read(self.midi, buffer, max_events)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3587 * if num_events < 0: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3588 * raise Exception(Pm_GetErrorText(num_events))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3589 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3590 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3591 __pyx_t_4 = (__pyx_v_num_events < 0);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3592 if (__pyx_t_4) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3593
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3594 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":689
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3595 * num_events = Pm_Read(self.midi, buffer, max_events)
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3596 * if num_events < 0:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3597 * raise Exception(Pm_GetErrorText(num_events)) # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3598 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3599 * events = []
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3600 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3601 __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_num_events)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3602 __Pyx_GOTREF(__pyx_t_2);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3603 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3604 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3605 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3606 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3607 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3608 __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3609 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3610 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3611 __Pyx_Raise(__pyx_t_2, 0, 0);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3612 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3613 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3614 goto __pyx_L7;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3615 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3616 __pyx_L7:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3617
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3618 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":691
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3619 * raise Exception(Pm_GetErrorText(num_events))
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3620 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3621 * events = [] # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3622 * if num_events >= 1:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3623 * for ev_no in range(num_events):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3624 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3625 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3626 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3627 __Pyx_DECREF(__pyx_v_events);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3628 __pyx_v_events = ((PyObject *)__pyx_t_2);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3629 __pyx_t_2 = 0;
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3630
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3631 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":692
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3632 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3633 * events = []
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3634 * if num_events >= 1: # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3635 * for ev_no in range(num_events):
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3636 * events.append(
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3637 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3638 __pyx_t_4 = (__pyx_v_num_events >= 1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3639 if (__pyx_t_4) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3640
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3641 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":693
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3642 * events = []
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3643 * if num_events >= 1:
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3644 * for ev_no in range(num_events): # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3645 * events.append(
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3646 * [
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3647 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3648 __pyx_t_2 = PyInt_FromLong(__pyx_v_num_events); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3649 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3650 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3651 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3652 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3653 __Pyx_GIVEREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3654 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3655 __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3656 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3657 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3658 if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3659 __pyx_t_6 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3660 } else {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3661 __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3662 __Pyx_GOTREF(__pyx_t_1);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3663 }
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3664 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3665 for (;;) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3666 if (likely(PyList_CheckExact(__pyx_t_1))) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3667 if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3668 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3669 } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3670 if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3671 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3672 } else {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3673 __pyx_t_2 = PyIter_Next(__pyx_t_1);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3674 if (!__pyx_t_2) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3675 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3676 break;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3677 }
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3678 __Pyx_GOTREF(__pyx_t_2);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3679 }
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3680 __Pyx_DECREF(__pyx_v_ev_no);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3681 __pyx_v_ev_no = __pyx_t_2;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3682 __pyx_t_2 = 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3683
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3684 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":697
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3685 * [
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3686 * [
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3687 * buffer[ev_no].message & 0xFF, # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3688 * (buffer[ev_no].message >> 8) & 0xFF,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3689 * (buffer[ev_no].message >> 16) & 0xFF,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3690 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3691 __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_ev_no); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3692 __pyx_t_2 = PyInt_FromLong(((__pyx_v_buffer[__pyx_t_7]).message & 0xFF)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3693 __Pyx_GOTREF(__pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3694
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3695 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":698
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3696 * [
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3697 * buffer[ev_no].message & 0xFF,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3698 * (buffer[ev_no].message >> 8) & 0xFF, # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3699 * (buffer[ev_no].message >> 16) & 0xFF,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3700 * (buffer[ev_no].message >> 24) & 0xFF
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3701 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3702 __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_ev_no); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3703 __pyx_t_8 = PyInt_FromLong((((__pyx_v_buffer[__pyx_t_7]).message >> 8) & 0xFF)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3704 __Pyx_GOTREF(__pyx_t_8);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3705
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3706 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":699
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3707 * buffer[ev_no].message & 0xFF,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3708 * (buffer[ev_no].message >> 8) & 0xFF,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3709 * (buffer[ev_no].message >> 16) & 0xFF, # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3710 * (buffer[ev_no].message >> 24) & 0xFF
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3711 * ],
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3712 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3713 __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_ev_no); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3714 __pyx_t_9 = PyInt_FromLong((((__pyx_v_buffer[__pyx_t_7]).message >> 16) & 0xFF)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3715 __Pyx_GOTREF(__pyx_t_9);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3716
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3717 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":700
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3718 * (buffer[ev_no].message >> 8) & 0xFF,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3719 * (buffer[ev_no].message >> 16) & 0xFF,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3720 * (buffer[ev_no].message >> 24) & 0xFF # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3721 * ],
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3722 * buffer[ev_no].timestamp
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3723 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3724 __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_ev_no); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3725 __pyx_t_10 = PyInt_FromLong((((__pyx_v_buffer[__pyx_t_7]).message >> 24) & 0xFF)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3726 __Pyx_GOTREF(__pyx_t_10);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3727 __pyx_t_11 = PyList_New(4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3728 __Pyx_GOTREF(((PyObject *)__pyx_t_11));
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3729 PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3730 __Pyx_GIVEREF(__pyx_t_2);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3731 PyList_SET_ITEM(__pyx_t_11, 1, __pyx_t_8);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3732 __Pyx_GIVEREF(__pyx_t_8);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3733 PyList_SET_ITEM(__pyx_t_11, 2, __pyx_t_9);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3734 __Pyx_GIVEREF(__pyx_t_9);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3735 PyList_SET_ITEM(__pyx_t_11, 3, __pyx_t_10);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3736 __Pyx_GIVEREF(__pyx_t_10);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3737 __pyx_t_2 = 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3738 __pyx_t_8 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3739 __pyx_t_9 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3740 __pyx_t_10 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3741
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3742 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":702
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3743 * (buffer[ev_no].message >> 24) & 0xFF
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3744 * ],
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3745 * buffer[ev_no].timestamp # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3746 * ]
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3747 * )
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3748 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3749 __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_ev_no); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3750 __pyx_t_10 = PyInt_FromLong((__pyx_v_buffer[__pyx_t_7]).timestamp); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3751 __Pyx_GOTREF(__pyx_t_10);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3752 __pyx_t_9 = PyList_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3753 __Pyx_GOTREF(((PyObject *)__pyx_t_9));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3754 PyList_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_11));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3755 __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3756 PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3757 __Pyx_GIVEREF(__pyx_t_10);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3758 __pyx_t_11 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3759 __pyx_t_10 = 0;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3760 __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_events, ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3761 __Pyx_GOTREF(__pyx_t_10);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3762 __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3763 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3764 }
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3765 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3766 goto __pyx_L8;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3767 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3768 __pyx_L8:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3769
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3770 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":706
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3771 * )
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3772 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3773 * return events # <<<<<<<<<<<<<<
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3774 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3775 __Pyx_XDECREF(__pyx_r);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3776 __Pyx_INCREF(__pyx_v_events);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3777 __pyx_r = __pyx_v_events;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3778 goto __pyx_L0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3779
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3780 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3781 goto __pyx_L0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3782 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3783 __Pyx_XDECREF(__pyx_t_1);
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3784 __Pyx_XDECREF(__pyx_t_2);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3785 __Pyx_XDECREF(__pyx_t_8);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3786 __Pyx_XDECREF(__pyx_t_9);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3787 __Pyx_XDECREF(__pyx_t_10);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3788 __Pyx_XDECREF(__pyx_t_11);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3789 __Pyx_AddTraceback("pypm.Input.Read");
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3790 __pyx_r = NULL;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3791 __pyx_L0:;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3792 __Pyx_DECREF(__pyx_v_events);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3793 __Pyx_DECREF(__pyx_v_ev_no);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3794 __Pyx_XGIVEREF(__pyx_r);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3795 __Pyx_FinishRefcountContext();
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3796 return __pyx_r;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3797 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3798
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3799 static PyObject *__pyx_tp_new_4pypm_Output(PyTypeObject *t, PyObject *a, PyObject *k) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3800 PyObject *o = (*t->tp_alloc)(t, 0);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3801 if (!o) return 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3802 return o;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3803 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3804
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3805 static void __pyx_tp_dealloc_4pypm_Output(PyObject *o) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3806 {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3807 PyObject *etype, *eval, *etb;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3808 PyErr_Fetch(&etype, &eval, &etb);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3809 ++Py_REFCNT(o);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3810 __pyx_pf_4pypm_6Output___dealloc__(o);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3811 if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3812 --Py_REFCNT(o);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3813 PyErr_Restore(etype, eval, etb);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3814 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3815 (*Py_TYPE(o)->tp_free)(o);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3816 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3817
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3818 static struct PyMethodDef __pyx_methods_4pypm_Output[] = {
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3819 {__Pyx_NAMESTR("_check_open"), (PyCFunction)__pyx_pf_4pypm_6Output__check_open, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_6Output__check_open)},
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3820 {__Pyx_NAMESTR("Close"), (PyCFunction)__pyx_pf_4pypm_6Output_Close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_6Output_Close)},
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3821 {__Pyx_NAMESTR("Abort"), (PyCFunction)__pyx_pf_4pypm_6Output_Abort, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_6Output_Abort)},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3822 {__Pyx_NAMESTR("Write"), (PyCFunction)__pyx_pf_4pypm_6Output_Write, METH_O, __Pyx_DOCSTR(__pyx_doc_4pypm_6Output_Write)},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3823 {__Pyx_NAMESTR("WriteShort"), (PyCFunction)__pyx_pf_4pypm_6Output_WriteShort, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4pypm_6Output_WriteShort)},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3824 {__Pyx_NAMESTR("WriteSysEx"), (PyCFunction)__pyx_pf_4pypm_6Output_WriteSysEx, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4pypm_6Output_WriteSysEx)},
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3825 {0, 0, 0, 0}
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3826 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3827
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3828 static PyNumberMethods __pyx_tp_as_number_Output = {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3829 0, /*nb_add*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3830 0, /*nb_subtract*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3831 0, /*nb_multiply*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3832 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3833 0, /*nb_divide*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3834 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3835 0, /*nb_remainder*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3836 0, /*nb_divmod*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3837 0, /*nb_power*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3838 0, /*nb_negative*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3839 0, /*nb_positive*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3840 0, /*nb_absolute*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3841 0, /*nb_nonzero*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3842 0, /*nb_invert*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3843 0, /*nb_lshift*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3844 0, /*nb_rshift*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3845 0, /*nb_and*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3846 0, /*nb_xor*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3847 0, /*nb_or*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3848 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3849 0, /*nb_coerce*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3850 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3851 0, /*nb_int*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3852 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3853 0, /*reserved*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3854 #else
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3855 0, /*nb_long*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3856 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3857 0, /*nb_float*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3858 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3859 0, /*nb_oct*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3860 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3861 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3862 0, /*nb_hex*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3863 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3864 0, /*nb_inplace_add*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3865 0, /*nb_inplace_subtract*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3866 0, /*nb_inplace_multiply*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3867 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3868 0, /*nb_inplace_divide*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3869 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3870 0, /*nb_inplace_remainder*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3871 0, /*nb_inplace_power*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3872 0, /*nb_inplace_lshift*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3873 0, /*nb_inplace_rshift*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3874 0, /*nb_inplace_and*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3875 0, /*nb_inplace_xor*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3876 0, /*nb_inplace_or*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3877 0, /*nb_floor_divide*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3878 0, /*nb_true_divide*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3879 0, /*nb_inplace_floor_divide*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3880 0, /*nb_inplace_true_divide*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3881 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3882 0, /*nb_index*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3883 #endif
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3884 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3885
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3886 static PySequenceMethods __pyx_tp_as_sequence_Output = {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3887 0, /*sq_length*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3888 0, /*sq_concat*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3889 0, /*sq_repeat*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3890 0, /*sq_item*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3891 0, /*sq_slice*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3892 0, /*sq_ass_item*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3893 0, /*sq_ass_slice*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3894 0, /*sq_contains*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3895 0, /*sq_inplace_concat*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3896 0, /*sq_inplace_repeat*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3897 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3898
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3899 static PyMappingMethods __pyx_tp_as_mapping_Output = {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3900 0, /*mp_length*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3901 0, /*mp_subscript*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3902 0, /*mp_ass_subscript*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3903 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3904
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3905 static PyBufferProcs __pyx_tp_as_buffer_Output = {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3906 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3907 0, /*bf_getreadbuffer*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3908 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3909 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3910 0, /*bf_getwritebuffer*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3911 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3912 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3913 0, /*bf_getsegcount*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3914 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3915 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3916 0, /*bf_getcharbuffer*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3917 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3918 #if PY_VERSION_HEX >= 0x02060000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3919 0, /*bf_getbuffer*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3920 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3921 #if PY_VERSION_HEX >= 0x02060000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3922 0, /*bf_releasebuffer*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3923 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3924 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3925
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3926 PyTypeObject __pyx_type_4pypm_Output = {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3927 PyVarObject_HEAD_INIT(0, 0)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3928 __Pyx_NAMESTR("pypm.Output"), /*tp_name*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3929 sizeof(struct __pyx_obj_4pypm_Output), /*tp_basicsize*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3930 0, /*tp_itemsize*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3931 __pyx_tp_dealloc_4pypm_Output, /*tp_dealloc*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3932 0, /*tp_print*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3933 0, /*tp_getattr*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3934 0, /*tp_setattr*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3935 0, /*tp_compare*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3936 0, /*tp_repr*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3937 &__pyx_tp_as_number_Output, /*tp_as_number*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3938 &__pyx_tp_as_sequence_Output, /*tp_as_sequence*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3939 &__pyx_tp_as_mapping_Output, /*tp_as_mapping*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3940 0, /*tp_hash*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3941 0, /*tp_call*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3942 0, /*tp_str*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3943 0, /*tp_getattro*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3944 0, /*tp_setattro*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3945 &__pyx_tp_as_buffer_Output, /*tp_as_buffer*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3946 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
3947 __Pyx_DOCSTR("Represents an output MIDI stream device.\n\n Takes the form::\n\n output = pypm.Output(output_device, latency)\n\n latency is in ms. If latency == 0 then timestamps for output are ignored.\n\n "), /*tp_doc*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3948 0, /*tp_traverse*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3949 0, /*tp_clear*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3950 0, /*tp_richcompare*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3951 0, /*tp_weaklistoffset*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3952 0, /*tp_iter*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3953 0, /*tp_iternext*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3954 __pyx_methods_4pypm_Output, /*tp_methods*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3955 0, /*tp_members*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3956 0, /*tp_getset*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3957 0, /*tp_base*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3958 0, /*tp_dict*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3959 0, /*tp_descr_get*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3960 0, /*tp_descr_set*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3961 0, /*tp_dictoffset*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3962 __pyx_pf_4pypm_6Output___init__, /*tp_init*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3963 0, /*tp_alloc*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3964 __pyx_tp_new_4pypm_Output, /*tp_new*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3965 0, /*tp_free*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3966 0, /*tp_is_gc*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3967 0, /*tp_bases*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3968 0, /*tp_mro*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3969 0, /*tp_cache*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3970 0, /*tp_subclasses*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3971 0, /*tp_weaklist*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3972 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3973
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3974 static PyObject *__pyx_tp_new_4pypm_Input(PyTypeObject *t, PyObject *a, PyObject *k) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3975 PyObject *o = (*t->tp_alloc)(t, 0);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3976 if (!o) return 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3977 return o;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3978 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3979
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3980 static void __pyx_tp_dealloc_4pypm_Input(PyObject *o) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3981 {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3982 PyObject *etype, *eval, *etb;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3983 PyErr_Fetch(&etype, &eval, &etb);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3984 ++Py_REFCNT(o);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3985 __pyx_pf_4pypm_5Input___dealloc__(o);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3986 if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3987 --Py_REFCNT(o);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3988 PyErr_Restore(etype, eval, etb);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3989 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3990 (*Py_TYPE(o)->tp_free)(o);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3991 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3992
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
3993 static struct PyMethodDef __pyx_methods_4pypm_Input[] = {
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3994 {__Pyx_NAMESTR("_check_open"), (PyCFunction)__pyx_pf_4pypm_5Input__check_open, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_5Input__check_open)},
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
3995 {__Pyx_NAMESTR("Close"), (PyCFunction)__pyx_pf_4pypm_5Input_Close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_5Input_Close)},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3996 {__Pyx_NAMESTR("SetFilter"), (PyCFunction)__pyx_pf_4pypm_5Input_SetFilter, METH_O, __Pyx_DOCSTR(__pyx_doc_4pypm_5Input_SetFilter)},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3997 {__Pyx_NAMESTR("SetChannelMask"), (PyCFunction)__pyx_pf_4pypm_5Input_SetChannelMask, METH_O, __Pyx_DOCSTR(__pyx_doc_4pypm_5Input_SetChannelMask)},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3998 {__Pyx_NAMESTR("Poll"), (PyCFunction)__pyx_pf_4pypm_5Input_Poll, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_5Input_Poll)},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
3999 {__Pyx_NAMESTR("Read"), (PyCFunction)__pyx_pf_4pypm_5Input_Read, METH_O, __Pyx_DOCSTR(__pyx_doc_4pypm_5Input_Read)},
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4000 {0, 0, 0, 0}
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4001 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4002
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4003 static PyNumberMethods __pyx_tp_as_number_Input = {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4004 0, /*nb_add*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4005 0, /*nb_subtract*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4006 0, /*nb_multiply*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4007 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4008 0, /*nb_divide*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4009 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4010 0, /*nb_remainder*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4011 0, /*nb_divmod*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4012 0, /*nb_power*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4013 0, /*nb_negative*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4014 0, /*nb_positive*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4015 0, /*nb_absolute*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4016 0, /*nb_nonzero*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4017 0, /*nb_invert*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4018 0, /*nb_lshift*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4019 0, /*nb_rshift*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4020 0, /*nb_and*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4021 0, /*nb_xor*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4022 0, /*nb_or*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4023 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4024 0, /*nb_coerce*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4025 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4026 0, /*nb_int*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4027 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4028 0, /*reserved*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4029 #else
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4030 0, /*nb_long*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4031 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4032 0, /*nb_float*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4033 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4034 0, /*nb_oct*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4035 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4036 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4037 0, /*nb_hex*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4038 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4039 0, /*nb_inplace_add*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4040 0, /*nb_inplace_subtract*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4041 0, /*nb_inplace_multiply*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4042 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4043 0, /*nb_inplace_divide*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4044 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4045 0, /*nb_inplace_remainder*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4046 0, /*nb_inplace_power*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4047 0, /*nb_inplace_lshift*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4048 0, /*nb_inplace_rshift*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4049 0, /*nb_inplace_and*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4050 0, /*nb_inplace_xor*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4051 0, /*nb_inplace_or*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4052 0, /*nb_floor_divide*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4053 0, /*nb_true_divide*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4054 0, /*nb_inplace_floor_divide*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4055 0, /*nb_inplace_true_divide*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4056 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4057 0, /*nb_index*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4058 #endif
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4059 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4060
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4061 static PySequenceMethods __pyx_tp_as_sequence_Input = {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4062 0, /*sq_length*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4063 0, /*sq_concat*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4064 0, /*sq_repeat*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4065 0, /*sq_item*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4066 0, /*sq_slice*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4067 0, /*sq_ass_item*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4068 0, /*sq_ass_slice*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4069 0, /*sq_contains*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4070 0, /*sq_inplace_concat*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4071 0, /*sq_inplace_repeat*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4072 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4073
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4074 static PyMappingMethods __pyx_tp_as_mapping_Input = {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4075 0, /*mp_length*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4076 0, /*mp_subscript*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4077 0, /*mp_ass_subscript*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4078 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4079
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4080 static PyBufferProcs __pyx_tp_as_buffer_Input = {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4081 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4082 0, /*bf_getreadbuffer*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4083 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4084 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4085 0, /*bf_getwritebuffer*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4086 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4087 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4088 0, /*bf_getsegcount*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4089 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4090 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4091 0, /*bf_getcharbuffer*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4092 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4093 #if PY_VERSION_HEX >= 0x02060000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4094 0, /*bf_getbuffer*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4095 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4096 #if PY_VERSION_HEX >= 0x02060000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4097 0, /*bf_releasebuffer*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4098 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4099 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4100
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4101 PyTypeObject __pyx_type_4pypm_Input = {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4102 PyVarObject_HEAD_INIT(0, 0)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4103 __Pyx_NAMESTR("pypm.Input"), /*tp_name*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4104 sizeof(struct __pyx_obj_4pypm_Input), /*tp_basicsize*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4105 0, /*tp_itemsize*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4106 __pyx_tp_dealloc_4pypm_Input, /*tp_dealloc*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4107 0, /*tp_print*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4108 0, /*tp_getattr*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4109 0, /*tp_setattr*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4110 0, /*tp_compare*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4111 0, /*tp_repr*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4112 &__pyx_tp_as_number_Input, /*tp_as_number*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4113 &__pyx_tp_as_sequence_Input, /*tp_as_sequence*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4114 &__pyx_tp_as_mapping_Input, /*tp_as_mapping*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4115 0, /*tp_hash*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4116 0, /*tp_call*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4117 0, /*tp_str*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4118 0, /*tp_getattro*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4119 0, /*tp_setattro*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4120 &__pyx_tp_as_buffer_Input, /*tp_as_buffer*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4121 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4122 __Pyx_DOCSTR("Represents an input MIDI stream device.\n\n Takes the form::\n\n input = pypm.Input(input_device)\n\n "), /*tp_doc*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4123 0, /*tp_traverse*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4124 0, /*tp_clear*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4125 0, /*tp_richcompare*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4126 0, /*tp_weaklistoffset*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4127 0, /*tp_iter*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4128 0, /*tp_iternext*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4129 __pyx_methods_4pypm_Input, /*tp_methods*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4130 0, /*tp_members*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4131 0, /*tp_getset*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4132 0, /*tp_base*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4133 0, /*tp_dict*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4134 0, /*tp_descr_get*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4135 0, /*tp_descr_set*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4136 0, /*tp_dictoffset*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4137 __pyx_pf_4pypm_5Input___init__, /*tp_init*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4138 0, /*tp_alloc*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4139 __pyx_tp_new_4pypm_Input, /*tp_new*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4140 0, /*tp_free*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4141 0, /*tp_is_gc*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4142 0, /*tp_bases*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4143 0, /*tp_mro*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4144 0, /*tp_cache*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4145 0, /*tp_subclasses*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4146 0, /*tp_weaklist*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4147 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4148
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4149 static struct PyMethodDef __pyx_methods[] = {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4150 {__Pyx_NAMESTR("Initialize"), (PyCFunction)__pyx_pf_4pypm_Initialize, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_Initialize)},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4151 {__Pyx_NAMESTR("Terminate"), (PyCFunction)__pyx_pf_4pypm_Terminate, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_Terminate)},
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4152 {__Pyx_NAMESTR("GetDefaultInputDeviceID"), (PyCFunction)__pyx_pf_4pypm_GetDefaultInputDeviceID, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_GetDefaultInputDeviceID)},
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4153 {__Pyx_NAMESTR("GetDefaultOutputDeviceID"), (PyCFunction)__pyx_pf_4pypm_GetDefaultOutputDeviceID, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_GetDefaultOutputDeviceID)},
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4154 {__Pyx_NAMESTR("CountDevices"), (PyCFunction)__pyx_pf_4pypm_CountDevices, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_CountDevices)},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4155 {__Pyx_NAMESTR("GetDeviceInfo"), (PyCFunction)__pyx_pf_4pypm_GetDeviceInfo, METH_O, __Pyx_DOCSTR(__pyx_doc_4pypm_GetDeviceInfo)},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4156 {__Pyx_NAMESTR("Time"), (PyCFunction)__pyx_pf_4pypm_Time, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4pypm_Time)},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4157 {__Pyx_NAMESTR("GetErrorText"), (PyCFunction)__pyx_pf_4pypm_GetErrorText, METH_O, __Pyx_DOCSTR(__pyx_doc_4pypm_GetErrorText)},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4158 {__Pyx_NAMESTR("Channel"), (PyCFunction)__pyx_pf_4pypm_Channel, METH_O, __Pyx_DOCSTR(__pyx_doc_4pypm_Channel)},
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4159 {0, 0, 0, 0}
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4160 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4161
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4162 static void __pyx_init_filenames(void); /*proto*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4163
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4164 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4165 static struct PyModuleDef __pyx_moduledef = {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4166 PyModuleDef_HEAD_INIT,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4167 __Pyx_NAMESTR("pypm"),
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4168 0, /* m_doc */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4169 -1, /* m_size */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4170 __pyx_methods /* m_methods */,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4171 NULL, /* m_reload */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4172 NULL, /* m_traverse */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4173 NULL, /* m_clear */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4174 NULL /* m_free */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4175 };
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4176 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4177
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4178 static __Pyx_StringTabEntry __pyx_string_tab[] = {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4179 {&__pyx_kp___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4180 {&__pyx_kp___init__, __pyx_k___init__, sizeof(__pyx_k___init__), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4181 {&__pyx_kp___dealloc__, __pyx_k___dealloc__, sizeof(__pyx_k___dealloc__), 1, 1, 1},
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
4182 {&__pyx_kp__check_open, __pyx_k__check_open, sizeof(__pyx_k__check_open), 1, 1, 1},
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
4183 {&__pyx_kp_Close, __pyx_k_Close, sizeof(__pyx_k_Close), 1, 1, 1},
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
4184 {&__pyx_kp_Abort, __pyx_k_Abort, sizeof(__pyx_k_Abort), 1, 1, 1},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4185 {&__pyx_kp_Write, __pyx_k_Write, sizeof(__pyx_k_Write), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4186 {&__pyx_kp_WriteShort, __pyx_k_WriteShort, sizeof(__pyx_k_WriteShort), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4187 {&__pyx_kp_WriteSysEx, __pyx_k_WriteSysEx, sizeof(__pyx_k_WriteSysEx), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4188 {&__pyx_kp_SetFilter, __pyx_k_SetFilter, sizeof(__pyx_k_SetFilter), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4189 {&__pyx_kp_SetChannelMask, __pyx_k_SetChannelMask, sizeof(__pyx_k_SetChannelMask), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4190 {&__pyx_kp_Poll, __pyx_k_Poll, sizeof(__pyx_k_Poll), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4191 {&__pyx_kp_Read, __pyx_k_Read, sizeof(__pyx_k_Read), 1, 1, 1},
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4192 {&__pyx_kp_device_no, __pyx_k_device_no, sizeof(__pyx_k_device_no), 1, 1, 1},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4193 {&__pyx_kp_err, __pyx_k_err, sizeof(__pyx_k_err), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4194 {&__pyx_kp_chan, __pyx_k_chan, sizeof(__pyx_k_chan), 1, 1, 1},
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4195 {&__pyx_kp_output_device, __pyx_k_output_device, sizeof(__pyx_k_output_device), 1, 1, 1},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4196 {&__pyx_kp_latency, __pyx_k_latency, sizeof(__pyx_k_latency), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4197 {&__pyx_kp_data, __pyx_k_data, sizeof(__pyx_k_data), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4198 {&__pyx_kp_status, __pyx_k_status, sizeof(__pyx_k_status), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4199 {&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4200 {&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4201 {&__pyx_kp_when, __pyx_k_when, sizeof(__pyx_k_when), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4202 {&__pyx_kp_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 1, 1, 1},
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4203 {&__pyx_kp_input_device, __pyx_k_input_device, sizeof(__pyx_k_input_device), 1, 1, 1},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4204 {&__pyx_kp_buffersize, __pyx_k_buffersize, sizeof(__pyx_k_buffersize), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4205 {&__pyx_kp_filters, __pyx_k_filters, sizeof(__pyx_k_filters), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4206 {&__pyx_kp_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 1, 1, 1},
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4207 {&__pyx_kp_max_events, __pyx_k_max_events, sizeof(__pyx_k_max_events), 1, 1, 1},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4208 {&__pyx_kp___version__, __pyx_k___version__, sizeof(__pyx_k___version__), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4209 {&__pyx_kp_array, __pyx_k_array, sizeof(__pyx_k_array), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4210 {&__pyx_kp_FILT_ACTIVE, __pyx_k_FILT_ACTIVE, sizeof(__pyx_k_FILT_ACTIVE), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4211 {&__pyx_kp_FILT_SYSEX, __pyx_k_FILT_SYSEX, sizeof(__pyx_k_FILT_SYSEX), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4212 {&__pyx_kp_FILT_CLOCK, __pyx_k_FILT_CLOCK, sizeof(__pyx_k_FILT_CLOCK), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4213 {&__pyx_kp_FILT_PLAY, __pyx_k_FILT_PLAY, sizeof(__pyx_k_FILT_PLAY), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4214 {&__pyx_kp_4, __pyx_k_4, sizeof(__pyx_k_4), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4215 {&__pyx_kp_FILT_TICK, __pyx_k_FILT_TICK, sizeof(__pyx_k_FILT_TICK), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4216 {&__pyx_kp_FILT_FD, __pyx_k_FILT_FD, sizeof(__pyx_k_FILT_FD), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4217 {&__pyx_kp_FILT_UNDEFINED, __pyx_k_FILT_UNDEFINED, sizeof(__pyx_k_FILT_UNDEFINED), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4218 {&__pyx_kp_FILT_RESET, __pyx_k_FILT_RESET, sizeof(__pyx_k_FILT_RESET), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4219 {&__pyx_kp_FILT_REALTIME, __pyx_k_FILT_REALTIME, sizeof(__pyx_k_FILT_REALTIME), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4220 {&__pyx_kp_FILT_NOTE, __pyx_k_FILT_NOTE, sizeof(__pyx_k_FILT_NOTE), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4221 {&__pyx_kp_5, __pyx_k_5, sizeof(__pyx_k_5), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4222 {&__pyx_kp_6, __pyx_k_6, sizeof(__pyx_k_6), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4223 {&__pyx_kp_FILT_AFTERTOUCH, __pyx_k_FILT_AFTERTOUCH, sizeof(__pyx_k_FILT_AFTERTOUCH), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4224 {&__pyx_kp_FILT_PROGRAM, __pyx_k_FILT_PROGRAM, sizeof(__pyx_k_FILT_PROGRAM), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4225 {&__pyx_kp_FILT_CONTROL, __pyx_k_FILT_CONTROL, sizeof(__pyx_k_FILT_CONTROL), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4226 {&__pyx_kp_FILT_PITCHBEND, __pyx_k_FILT_PITCHBEND, sizeof(__pyx_k_FILT_PITCHBEND), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4227 {&__pyx_kp_FILT_MTC, __pyx_k_FILT_MTC, sizeof(__pyx_k_FILT_MTC), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4228 {&__pyx_kp_FILT_SONG_POSITION, __pyx_k_FILT_SONG_POSITION, sizeof(__pyx_k_FILT_SONG_POSITION), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4229 {&__pyx_kp_FILT_SONG_SELECT, __pyx_k_FILT_SONG_SELECT, sizeof(__pyx_k_FILT_SONG_SELECT), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4230 {&__pyx_kp_FILT_TUNE, __pyx_k_FILT_TUNE, sizeof(__pyx_k_FILT_TUNE), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4231 {&__pyx_kp_FALSE, __pyx_k_FALSE, sizeof(__pyx_k_FALSE), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4232 {&__pyx_kp_TRUE, __pyx_k_TRUE, sizeof(__pyx_k_TRUE), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4233 {&__pyx_kp_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4234 {&__pyx_kp_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 1, 1, 1},
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4235 {&__pyx_kp_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 1, 1, 1},
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4236 {&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4237 {&__pyx_kp_range, __pyx_k_range, sizeof(__pyx_k_range), 1, 1, 1},
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4238 {&__pyx_kp_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 1, 0},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4239 {&__pyx_kp_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4240 {&__pyx_kp_append, __pyx_k_append, sizeof(__pyx_k_append), 1, 1, 1},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4241 {&__pyx_kp_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4242 {&__pyx_kp_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4243 {&__pyx_kp_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4244 {&__pyx_kp_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4245 {&__pyx_kp_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4246 {&__pyx_kp_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4247 {&__pyx_kp_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4248 {&__pyx_kp_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4249 {&__pyx_kp_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4250 {&__pyx_kp_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4251 {&__pyx_kp_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 0},
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
4252 {&__pyx_kp_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 0},
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4253 {&__pyx_kp_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 0},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4254 {&__pyx_kp_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 0},
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4255 {&__pyx_kp_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 0},
1860
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
4256 {&__pyx_kp_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 0},
68ca9ad3385a midi, no abort on dealloc by default. have explicit close/abort available.
Rene Dudfield <renesd@gmail.com>
parents: 1815
diff changeset
4257 {&__pyx_kp_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 0},
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4258 {0, 0, 0, 0, 0, 0}
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4259 };
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4260 static int __Pyx_InitCachedBuiltins(void) {
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4261 __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_kp_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4262 __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_kp_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4263 __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_kp_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4264 __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4265 __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_kp_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4266 return 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4267 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4268 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4269 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4270
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4271 static int __Pyx_InitGlobals(void) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4272 __pyx_int_0x1 = PyInt_FromLong(0x1); if (unlikely(!__pyx_int_0x1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4273 __pyx_int_0x2 = PyInt_FromLong(0x2); if (unlikely(!__pyx_int_0x2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4274 __pyx_int_0x4 = PyInt_FromLong(0x4); if (unlikely(!__pyx_int_0x4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4275 __pyx_int_0x8 = PyInt_FromLong(0x8); if (unlikely(!__pyx_int_0x8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4276 __pyx_int_0x10 = PyInt_FromLong(0x10); if (unlikely(!__pyx_int_0x10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4277 __pyx_int_0x20 = PyInt_FromLong(0x20); if (unlikely(!__pyx_int_0x20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4278 __pyx_int_0x30 = PyInt_FromLong(0x30); if (unlikely(!__pyx_int_0x30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4279 __pyx_int_0x40 = PyInt_FromLong(0x40); if (unlikely(!__pyx_int_0x40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4280 __pyx_int_0x7F = PyInt_FromLong(0x7F); if (unlikely(!__pyx_int_0x7F)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4281 __pyx_int_0x80 = PyInt_FromLong(0x80); if (unlikely(!__pyx_int_0x80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4282 __pyx_int_0x100 = PyInt_FromLong(0x100); if (unlikely(!__pyx_int_0x100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4283 __pyx_int_0x200 = PyInt_FromLong(0x200); if (unlikely(!__pyx_int_0x200)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4284 __pyx_int_0x300 = PyInt_FromLong(0x300); if (unlikely(!__pyx_int_0x300)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4285 __pyx_int_0x400 = PyInt_FromLong(0x400); if (unlikely(!__pyx_int_0x400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4286 __pyx_int_0x800 = PyInt_FromLong(0x800); if (unlikely(!__pyx_int_0x800)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4287 __pyx_int_0x1000 = PyInt_FromLong(0x1000); if (unlikely(!__pyx_int_0x1000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4288 __pyx_int_0x2000 = PyInt_FromLong(0x2000); if (unlikely(!__pyx_int_0x2000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4289 __pyx_int_0x4000 = PyInt_FromLong(0x4000); if (unlikely(!__pyx_int_0x4000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4290 __pyx_int_0x8000 = PyInt_FromLong(0x8000); if (unlikely(!__pyx_int_0x8000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4291 __pyx_int_0x10000 = PyInt_FromLong(0x10000); if (unlikely(!__pyx_int_0x10000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4292 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4293 __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4294 __pyx_int_4096 = PyInt_FromLong(4096); if (unlikely(!__pyx_int_4096)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4295 __pyx_int_0xFF = PyInt_FromLong(0xFF); if (unlikely(!__pyx_int_0xFF)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4296 __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4297 __pyx_int_0xFF0000 = PyInt_FromLong(0xFF0000); if (unlikely(!__pyx_int_0xFF0000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4298 __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4299 __pyx_int_0xFF00 = PyInt_FromLong(0xFF00); if (unlikely(!__pyx_int_0xFF00)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4300 __pyx_int_1024 = PyInt_FromLong(1024); if (unlikely(!__pyx_int_1024)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4301 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4302 return 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4303 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4304 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4305 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4306
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4307 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4308 PyMODINIT_FUNC initpypm(void); /*proto*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4309 PyMODINIT_FUNC initpypm(void)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4310 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4311 PyMODINIT_FUNC PyInit_pypm(void); /*proto*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4312 PyMODINIT_FUNC PyInit_pypm(void)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4313 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4314 {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4315 PyObject *__pyx_1 = 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4316 #ifdef CYTHON_REFNANNY
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4317 void* __pyx_refchk = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4318 __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4319 if (!__Pyx_Refnanny) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4320 PyErr_Clear();
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4321 __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4322 if (!__Pyx_Refnanny)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4323 Py_FatalError("failed to import refnanny module");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4324 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4325 __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_pypm(void)", __LINE__, __FILE__);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4326 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4327 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4328 /*--- Library function declarations ---*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4329 __pyx_init_filenames();
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4330 /*--- Threads initialization code ---*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4331 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4332 #ifdef WITH_THREAD /* Python build with threading support? */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4333 PyEval_InitThreads();
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4334 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4335 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4336 /*--- Initialize various global constants etc. ---*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4337 if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4338 /*--- Module creation code ---*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4339 #if PY_MAJOR_VERSION < 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4340 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("pypm"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4341 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4342 __pyx_m = PyModule_Create(&__pyx_moduledef);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4343 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4344 if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4345 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4346 Py_INCREF(__pyx_m);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4347 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4348 __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4349 if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4350 if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4351 if (__pyx_module_is_main_pypm) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4352 if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_kp___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4353 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4354 /*--- Builtin init code ---*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4355 if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4356 __pyx_skip_dispatch = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4357 /*--- Global init code ---*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4358 /*--- Function export code ---*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4359 /*--- Type init code ---*/
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4360 if (PyType_Ready(&__pyx_type_4pypm_Output) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4361 if (__Pyx_SetAttrString(__pyx_m, "Output", (PyObject *)&__pyx_type_4pypm_Output) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4362 __pyx_ptype_4pypm_Output = &__pyx_type_4pypm_Output;
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4363 if (PyType_Ready(&__pyx_type_4pypm_Input) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4364 if (__Pyx_SetAttrString(__pyx_m, "Input", (PyObject *)&__pyx_type_4pypm_Input) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4365 __pyx_ptype_4pypm_Input = &__pyx_type_4pypm_Input;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4366 /*--- Type import code ---*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4367 /*--- Function import code ---*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4368 /*--- Execution code ---*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4369
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4370 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":8
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4371 * # written in Pyrex
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4372 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4373 * __version__ = "0.0.6" # <<<<<<<<<<<<<<
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4374 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4375 * import array
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4376 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4377 if (PyObject_SetAttr(__pyx_m, __pyx_kp___version__, __pyx_kp_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4378
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4379 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":10
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4380 * __version__ = "0.0.6"
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4381 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4382 * import array # <<<<<<<<<<<<<<
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4383 *
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4384 * # CHANGES:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4385 */
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4386 __pyx_1 = __Pyx_Import(__pyx_kp_array, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4387 __Pyx_GOTREF(__pyx_1);
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4388 if (PyObject_SetAttr(__pyx_m, __pyx_kp_array, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4389 __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4390
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4391 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":40
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4392 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4393 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4394 * FILT_ACTIVE = 0x1 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4395 * FILT_SYSEX = 0x2
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4396 * FILT_CLOCK = 0x4
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4397 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4398 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_ACTIVE, __pyx_int_0x1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4399
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4400 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":41
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4401 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4402 * FILT_ACTIVE = 0x1
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4403 * FILT_SYSEX = 0x2 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4404 * FILT_CLOCK = 0x4
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4405 * FILT_PLAY = 0x8
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4406 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4407 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_SYSEX, __pyx_int_0x2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4408
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4409 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":42
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4410 * FILT_ACTIVE = 0x1
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4411 * FILT_SYSEX = 0x2
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4412 * FILT_CLOCK = 0x4 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4413 * FILT_PLAY = 0x8
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4414 * FILT_F9 = 0x10
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4415 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4416 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_CLOCK, __pyx_int_0x4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4417
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4418 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":43
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4419 * FILT_SYSEX = 0x2
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4420 * FILT_CLOCK = 0x4
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4421 * FILT_PLAY = 0x8 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4422 * FILT_F9 = 0x10
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4423 * FILT_TICK = 0x10
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4424 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4425 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_PLAY, __pyx_int_0x8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4426
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4427 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":44
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4428 * FILT_CLOCK = 0x4
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4429 * FILT_PLAY = 0x8
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4430 * FILT_F9 = 0x10 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4431 * FILT_TICK = 0x10
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4432 * FILT_FD = 0x20
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4433 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4434 if (PyObject_SetAttr(__pyx_m, __pyx_kp_4, __pyx_int_0x10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4435
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4436 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":45
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4437 * FILT_PLAY = 0x8
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4438 * FILT_F9 = 0x10
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4439 * FILT_TICK = 0x10 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4440 * FILT_FD = 0x20
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4441 * FILT_UNDEFINED = 0x30
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4442 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4443 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_TICK, __pyx_int_0x10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4444
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4445 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":46
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4446 * FILT_F9 = 0x10
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4447 * FILT_TICK = 0x10
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4448 * FILT_FD = 0x20 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4449 * FILT_UNDEFINED = 0x30
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4450 * FILT_RESET = 0x40
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4451 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4452 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_FD, __pyx_int_0x20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4453
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4454 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":47
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4455 * FILT_TICK = 0x10
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4456 * FILT_FD = 0x20
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4457 * FILT_UNDEFINED = 0x30 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4458 * FILT_RESET = 0x40
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4459 * FILT_REALTIME = 0x7F
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4460 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4461 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_UNDEFINED, __pyx_int_0x30) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4462
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4463 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":48
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4464 * FILT_FD = 0x20
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4465 * FILT_UNDEFINED = 0x30
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4466 * FILT_RESET = 0x40 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4467 * FILT_REALTIME = 0x7F
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4468 * FILT_NOTE = 0x80
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4469 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4470 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_RESET, __pyx_int_0x40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4471
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4472 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":49
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4473 * FILT_UNDEFINED = 0x30
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4474 * FILT_RESET = 0x40
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4475 * FILT_REALTIME = 0x7F # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4476 * FILT_NOTE = 0x80
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4477 * FILT_CHANNEL_AFTERTOUCH = 0x100
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4478 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4479 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_REALTIME, __pyx_int_0x7F) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4480
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4481 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":50
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4482 * FILT_RESET = 0x40
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4483 * FILT_REALTIME = 0x7F
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4484 * FILT_NOTE = 0x80 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4485 * FILT_CHANNEL_AFTERTOUCH = 0x100
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4486 * FILT_POLY_AFTERTOUCH = 0x200
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4487 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4488 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_NOTE, __pyx_int_0x80) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4489
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4490 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":51
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4491 * FILT_REALTIME = 0x7F
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4492 * FILT_NOTE = 0x80
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4493 * FILT_CHANNEL_AFTERTOUCH = 0x100 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4494 * FILT_POLY_AFTERTOUCH = 0x200
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4495 * FILT_AFTERTOUCH = 0x300
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4496 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4497 if (PyObject_SetAttr(__pyx_m, __pyx_kp_5, __pyx_int_0x100) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4498
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4499 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":52
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4500 * FILT_NOTE = 0x80
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4501 * FILT_CHANNEL_AFTERTOUCH = 0x100
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4502 * FILT_POLY_AFTERTOUCH = 0x200 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4503 * FILT_AFTERTOUCH = 0x300
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4504 * FILT_PROGRAM = 0x400
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4505 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4506 if (PyObject_SetAttr(__pyx_m, __pyx_kp_6, __pyx_int_0x200) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4507
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4508 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":53
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4509 * FILT_CHANNEL_AFTERTOUCH = 0x100
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4510 * FILT_POLY_AFTERTOUCH = 0x200
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4511 * FILT_AFTERTOUCH = 0x300 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4512 * FILT_PROGRAM = 0x400
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4513 * FILT_CONTROL = 0x800
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4514 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4515 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_AFTERTOUCH, __pyx_int_0x300) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4516
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4517 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":54
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4518 * FILT_POLY_AFTERTOUCH = 0x200
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4519 * FILT_AFTERTOUCH = 0x300
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4520 * FILT_PROGRAM = 0x400 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4521 * FILT_CONTROL = 0x800
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4522 * FILT_PITCHBEND = 0x1000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4523 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4524 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_PROGRAM, __pyx_int_0x400) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4525
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4526 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":55
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4527 * FILT_AFTERTOUCH = 0x300
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4528 * FILT_PROGRAM = 0x400
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4529 * FILT_CONTROL = 0x800 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4530 * FILT_PITCHBEND = 0x1000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4531 * FILT_MTC = 0x2000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4532 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4533 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_CONTROL, __pyx_int_0x800) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4534
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4535 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":56
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4536 * FILT_PROGRAM = 0x400
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4537 * FILT_CONTROL = 0x800
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4538 * FILT_PITCHBEND = 0x1000 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4539 * FILT_MTC = 0x2000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4540 * FILT_SONG_POSITION = 0x4000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4541 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4542 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_PITCHBEND, __pyx_int_0x1000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4543
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4544 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":57
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4545 * FILT_CONTROL = 0x800
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4546 * FILT_PITCHBEND = 0x1000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4547 * FILT_MTC = 0x2000 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4548 * FILT_SONG_POSITION = 0x4000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4549 * FILT_SONG_SELECT = 0x8000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4550 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4551 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_MTC, __pyx_int_0x2000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4552
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4553 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":58
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4554 * FILT_PITCHBEND = 0x1000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4555 * FILT_MTC = 0x2000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4556 * FILT_SONG_POSITION = 0x4000 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4557 * FILT_SONG_SELECT = 0x8000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4558 * FILT_TUNE = 0x10000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4559 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4560 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_SONG_POSITION, __pyx_int_0x4000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4561
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4562 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":59
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4563 * FILT_MTC = 0x2000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4564 * FILT_SONG_POSITION = 0x4000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4565 * FILT_SONG_SELECT = 0x8000 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4566 * FILT_TUNE = 0x10000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4567 * FALSE = 0
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4568 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4569 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_SONG_SELECT, __pyx_int_0x8000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4570
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4571 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":60
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4572 * FILT_SONG_POSITION = 0x4000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4573 * FILT_SONG_SELECT = 0x8000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4574 * FILT_TUNE = 0x10000 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4575 * FALSE = 0
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4576 * TRUE = 1
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4577 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4578 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FILT_TUNE, __pyx_int_0x10000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4579
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4580 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":61
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4581 * FILT_SONG_SELECT = 0x8000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4582 * FILT_TUNE = 0x10000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4583 * FALSE = 0 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4584 * TRUE = 1
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4585 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4586 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4587 if (PyObject_SetAttr(__pyx_m, __pyx_kp_FALSE, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4588
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4589 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":62
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4590 * FILT_TUNE = 0x10000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4591 * FALSE = 0
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4592 * TRUE = 1 # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4593 *
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4594 * cdef extern from "portmidi.h":
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4595 */
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4596 if (PyObject_SetAttr(__pyx_m, __pyx_kp_TRUE, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4597
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4598 /* "/home/rene/dev/pygame/pygame/trunk/src/pypm.pyx":664
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4599 * return err
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4600 *
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4601 * def Read(self, max_events): # <<<<<<<<<<<<<<
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4602 * """Read and return up to max_events events from input.
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
4603 *
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4604 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4605 goto __pyx_L0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4606 __pyx_L1_error:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4607 __Pyx_XDECREF(__pyx_1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4608 __Pyx_AddTraceback("pypm");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4609 Py_DECREF(__pyx_m); __pyx_m = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4610 __pyx_L0:;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4611 __Pyx_FinishRefcountContext();
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4612 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4613 return;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4614 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4615 return __pyx_m;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4616 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4617 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4618
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4619 static const char *__pyx_filenames[] = {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4620 "pypm.pyx",
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4621 };
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4622
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4623 /* Runtime support code */
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4624
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4625 static void __pyx_init_filenames(void) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4626 __pyx_f = __pyx_filenames;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4627 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4628
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4629 static void __Pyx_RaiseDoubleKeywordsError(
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4630 const char* func_name,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4631 PyObject* kw_name)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4632 {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4633 PyErr_Format(PyExc_TypeError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4634 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4635 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4636 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4637 "%s() got multiple values for keyword argument '%s'", func_name,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4638 PyString_AS_STRING(kw_name));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4639 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4640 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4641
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4642 static void __Pyx_RaiseArgtupleInvalid(
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4643 const char* func_name,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4644 int exact,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4645 Py_ssize_t num_min,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4646 Py_ssize_t num_max,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4647 Py_ssize_t num_found)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4648 {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4649 Py_ssize_t num_expected;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4650 const char *number, *more_or_less;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4651
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4652 if (num_found < num_min) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4653 num_expected = num_min;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4654 more_or_less = "at least";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4655 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4656 num_expected = num_max;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4657 more_or_less = "at most";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4658 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4659 if (exact) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4660 more_or_less = "exactly";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4661 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4662 number = (num_expected == 1) ? "" : "s";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4663 PyErr_Format(PyExc_TypeError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4664 #if PY_VERSION_HEX < 0x02050000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4665 "%s() takes %s %d positional argument%s (%d given)",
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4666 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4667 "%s() takes %s %zd positional argument%s (%zd given)",
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4668 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4669 func_name, more_or_less, num_expected, number, num_found);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4670 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4671
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4672 static int __Pyx_ParseOptionalKeywords(
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4673 PyObject *kwds,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4674 PyObject **argnames[],
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4675 PyObject *kwds2,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4676 PyObject *values[],
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4677 Py_ssize_t num_pos_args,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4678 const char* function_name)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4679 {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4680 PyObject *key = 0, *value = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4681 Py_ssize_t pos = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4682 PyObject*** name;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4683 PyObject*** first_kw_arg = argnames + num_pos_args;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4684
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4685 while (PyDict_Next(kwds, &pos, &key, &value)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4686 name = first_kw_arg;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4687 while (*name && (**name != key)) name++;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4688 if (*name) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4689 values[name-argnames] = value;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4690 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4691 #if PY_MAJOR_VERSION < 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4692 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4693 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4694 if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4695 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4696 goto invalid_keyword_type;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4697 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4698 for (name = first_kw_arg; *name; name++) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4699 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4700 if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4701 PyUnicode_Compare(**name, key) == 0) break;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4702 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4703 if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4704 _PyString_Eq(**name, key)) break;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4705 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4706 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4707 if (*name) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4708 values[name-argnames] = value;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4709 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4710 /* unexpected keyword found */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4711 for (name=argnames; name != first_kw_arg; name++) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4712 if (**name == key) goto arg_passed_twice;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4713 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4714 if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4715 PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4716 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4717 if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4718 _PyString_Eq(**name, key)) goto arg_passed_twice;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4719 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4720 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4721 if (kwds2) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4722 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4723 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4724 goto invalid_keyword;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4725 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4726 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4727 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4728 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4729 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4730 return 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4731 arg_passed_twice:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4732 __Pyx_RaiseDoubleKeywordsError(function_name, **name);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4733 goto bad;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4734 invalid_keyword_type:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4735 PyErr_Format(PyExc_TypeError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4736 "%s() keywords must be strings", function_name);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4737 goto bad;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4738 invalid_keyword:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4739 PyErr_Format(PyExc_TypeError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4740 #if PY_MAJOR_VERSION < 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4741 "%s() got an unexpected keyword argument '%s'",
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4742 function_name, PyString_AsString(key));
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4743 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4744 "%s() got an unexpected keyword argument '%U'",
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4745 function_name, key);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4746 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4747 bad:
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4748 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4749 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4750
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4751
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4752 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4753 PyObject *__import__ = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4754 PyObject *empty_list = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4755 PyObject *module = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4756 PyObject *global_dict = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4757 PyObject *empty_dict = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4758 PyObject *list;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4759 __import__ = __Pyx_GetAttrString(__pyx_b, "__import__");
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4760 if (!__import__)
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4761 goto bad;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4762 if (from_list)
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4763 list = from_list;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4764 else {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4765 empty_list = PyList_New(0);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4766 if (!empty_list)
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4767 goto bad;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4768 list = empty_list;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4769 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4770 global_dict = PyModule_GetDict(__pyx_m);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4771 if (!global_dict)
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4772 goto bad;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4773 empty_dict = PyDict_New();
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4774 if (!empty_dict)
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4775 goto bad;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4776 module = PyObject_CallFunctionObjArgs(__import__,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4777 name, global_dict, empty_dict, list, NULL);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4778 bad:
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4779 Py_XDECREF(empty_list);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4780 Py_XDECREF(__import__);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4781 Py_XDECREF(empty_dict);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4782 return module;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4783 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4784
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4785 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4786 static PyObject *__Pyx_GetStdout(void) {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4787 PyObject *f = PySys_GetObject((char *)"stdout");
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4788 if (!f) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4789 PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4790 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4791 return f;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4792 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4793
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4794 static int __Pyx_Print(PyObject *arg_tuple, int newline) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4795 PyObject *f;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4796 PyObject* v;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4797 int i;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4798
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4799 if (!(f = __Pyx_GetStdout()))
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4800 return -1;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4801 for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4802 if (PyFile_SoftSpace(f, 1)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4803 if (PyFile_WriteString(" ", f) < 0)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4804 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4805 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4806 v = PyTuple_GET_ITEM(arg_tuple, i);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4807 if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4808 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4809 if (PyString_Check(v)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4810 char *s = PyString_AsString(v);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4811 Py_ssize_t len = PyString_Size(v);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4812 if (len > 0 &&
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4813 isspace(Py_CHARMASK(s[len-1])) &&
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4814 s[len-1] != ' ')
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4815 PyFile_SoftSpace(f, 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4816 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4817 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4818 if (newline) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4819 if (PyFile_WriteString("\n", f) < 0)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4820 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4821 PyFile_SoftSpace(f, 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4822 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4823 return 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4824 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4825
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4826 #else /* Python 3 has a print function */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4827
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4828 static int __Pyx_Print(PyObject *arg_tuple, int newline) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4829 PyObject* kwargs = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4830 PyObject* result = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4831 PyObject* end_string;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4832 if (!__pyx_print) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4833 __pyx_print = __Pyx_GetAttrString(__pyx_b, "print");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4834 if (!__pyx_print)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4835 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4836 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4837 if (!newline) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4838 if (!__pyx_print_kwargs) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4839 __pyx_print_kwargs = PyDict_New();
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4840 if (!__pyx_print_kwargs)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4841 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4842 end_string = PyUnicode_FromStringAndSize(" ", 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4843 if (!end_string)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4844 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4845 if (PyDict_SetItemString(__pyx_print_kwargs, "end", end_string) < 0) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4846 Py_DECREF(end_string);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4847 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4848 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4849 Py_DECREF(end_string);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4850 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4851 kwargs = __pyx_print_kwargs;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4852 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4853 result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4854 if (!result)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4855 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4856 Py_DECREF(result);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4857 return 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4858 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4859
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4860 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4861
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4862 #if PY_MAJOR_VERSION < 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4863
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4864 static int __Pyx_PrintOne(PyObject *o) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4865 PyObject *f;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4866 if (!(f = __Pyx_GetStdout()))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4867 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4868 if (PyFile_SoftSpace(f, 0)) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4869 if (PyFile_WriteString(" ", f) < 0)
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4870 return -1;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4871 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4872 if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4873 return -1;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4874 if (PyFile_WriteString("\n", f) < 0)
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4875 return -1;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4876 return 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4877 /* the line below is just to avoid compiler
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4878 * compiler warnings about unused functions */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4879 return __Pyx_Print(NULL, 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4880 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4881
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4882 #else /* Python 3 has a print function */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4883
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4884 static int __Pyx_PrintOne(PyObject *o) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4885 int res;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4886 PyObject* arg_tuple = PyTuple_New(1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4887 if (unlikely(!arg_tuple))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4888 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4889 Py_INCREF(o);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4890 PyTuple_SET_ITEM(arg_tuple, 0, o);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4891 res = __Pyx_Print(arg_tuple, 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4892 Py_DECREF(arg_tuple);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4893 return res;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4894 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4895
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4896 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4897
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4898 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4899 PyObject *result;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4900 result = PyObject_GetAttr(dict, name);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4901 if (!result)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4902 PyErr_SetObject(PyExc_NameError, name);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4903 return result;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4904 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4905
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4906 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4907 Py_XINCREF(type);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4908 Py_XINCREF(value);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4909 Py_XINCREF(tb);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4910 /* First, check the traceback argument, replacing None with NULL. */
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4911 if (tb == Py_None) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4912 Py_DECREF(tb);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4913 tb = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4914 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4915 else if (tb != NULL && !PyTraceBack_Check(tb)) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4916 PyErr_SetString(PyExc_TypeError,
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4917 "raise: arg 3 must be a traceback or None");
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4918 goto raise_error;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4919 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4920 /* Next, replace a missing value with None */
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4921 if (value == NULL) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4922 value = Py_None;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4923 Py_INCREF(value);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4924 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4925 #if PY_VERSION_HEX < 0x02050000
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4926 if (!PyClass_Check(type))
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4927 #else
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4928 if (!PyType_Check(type))
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4929 #endif
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4930 {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4931 /* Raising an instance. The value should be a dummy. */
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4932 if (value != Py_None) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4933 PyErr_SetString(PyExc_TypeError,
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4934 "instance exception may not have a separate value");
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4935 goto raise_error;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4936 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4937 /* Normalize to raise <class>, <instance> */
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4938 Py_DECREF(value);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4939 value = type;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4940 #if PY_VERSION_HEX < 0x02050000
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4941 if (PyInstance_Check(type)) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4942 type = (PyObject*) ((PyInstanceObject*)type)->in_class;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4943 Py_INCREF(type);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4944 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4945 else {
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4946 type = 0;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4947 PyErr_SetString(PyExc_TypeError,
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4948 "raise: exception must be an old-style class or instance");
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4949 goto raise_error;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4950 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4951 #else
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4952 type = (PyObject*) Py_TYPE(type);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4953 Py_INCREF(type);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4954 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4955 PyErr_SetString(PyExc_TypeError,
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4956 "raise: exception class must be a subclass of BaseException");
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4957 goto raise_error;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4958 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4959 #endif
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4960 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4961 __Pyx_ErrRestore(type, value, tb);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4962 return;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4963 raise_error:
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4964 Py_XDECREF(value);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4965 Py_XDECREF(type);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4966 Py_XDECREF(tb);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4967 return;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4968 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
4969
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4970 static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4971 PyObject *tmp_type, *tmp_value, *tmp_tb;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4972 PyThreadState *tstate = PyThreadState_GET();
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4973
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4974 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4975 /* Note: this is a temporary work-around to prevent crashes in Python 3.0 */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4976 if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4977 tmp_type = tstate->exc_type;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4978 tmp_value = tstate->exc_value;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4979 tmp_tb = tstate->exc_traceback;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4980 PyErr_NormalizeException(&type, &value, &tb);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4981 PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4982 tstate->exc_type = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4983 tstate->exc_value = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4984 tstate->exc_traceback = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4985 PyException_SetContext(value, tmp_value);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4986 Py_DECREF(tmp_type);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4987 Py_XDECREF(tmp_tb);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4988 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4989 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4990
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4991 tmp_type = tstate->curexc_type;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4992 tmp_value = tstate->curexc_value;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4993 tmp_tb = tstate->curexc_traceback;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4994 tstate->curexc_type = type;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4995 tstate->curexc_value = value;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4996 tstate->curexc_traceback = tb;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4997 Py_XDECREF(tmp_type);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4998 Py_XDECREF(tmp_value);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
4999 Py_XDECREF(tmp_tb);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5000 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5001
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5002 static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5003 PyThreadState *tstate = PyThreadState_GET();
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5004 *type = tstate->curexc_type;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5005 *value = tstate->curexc_value;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5006 *tb = tstate->curexc_traceback;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5007
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5008 tstate->curexc_type = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5009 tstate->curexc_value = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5010 tstate->curexc_traceback = 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5011 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5012
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5013
2149
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5014 static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5015 PyErr_Format(PyExc_ValueError,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5016 #if PY_VERSION_HEX < 0x02050000
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5017 "need more than %d value%s to unpack", (int)index,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5018 #else
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5019 "need more than %zd value%s to unpack", index,
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5020 #endif
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5021 (index == 1) ? "" : "s");
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5022 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5023
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5024 static INLINE void __Pyx_RaiseTooManyValuesError(void) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5025 PyErr_SetString(PyExc_ValueError, "too many values to unpack");
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5026 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5027
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5028 static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5029 PyObject *item;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5030 if (!(item = PyIter_Next(iter))) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5031 if (!PyErr_Occurred()) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5032 __Pyx_RaiseNeedMoreValuesError(index);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5033 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5034 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5035 return item;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5036 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5037
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5038 static int __Pyx_EndUnpack(PyObject *iter) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5039 PyObject *item;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5040 if ((item = PyIter_Next(iter))) {
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5041 Py_DECREF(item);
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5042 __Pyx_RaiseTooManyValuesError();
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5043 return -1;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5044 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5045 else if (!PyErr_Occurred())
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5046 return 0;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5047 else
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5048 return -1;
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5049 }
0996a28d48b2 Fixed a bug where garbage collection after an Input or Output are closed would cause an error. Also many code style clean ups and documentation added.
Rene Dudfield <renesd@gmail.com>
parents: 1860
diff changeset
5050
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5051 static INLINE int __Pyx_StrEq(const char *s1, const char *s2) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5052 while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5053 return *s1 == *s2;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5054 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5055
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5056 static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5057 if (sizeof(unsigned char) < sizeof(long)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5058 long val = __Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5059 if (unlikely(val != (long)(unsigned char)val)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5060 if (unlikely(val == -1 && PyErr_Occurred()))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5061 return (unsigned char)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5062 if (unlikely(val < 0)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5063 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5064 "can't convert negative value to unsigned char");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5065 return (unsigned char)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5066 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5067 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5068 "value too large to convert to unsigned char");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5069 return (unsigned char)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5070 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5071 return (unsigned char)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5072 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5073 return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5074 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5075
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5076 static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5077 if (sizeof(unsigned short) < sizeof(long)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5078 long val = __Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5079 if (unlikely(val != (long)(unsigned short)val)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5080 if (unlikely(val == -1 && PyErr_Occurred()))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5081 return (unsigned short)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5082 if (unlikely(val < 0)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5083 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5084 "can't convert negative value to unsigned short");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5085 return (unsigned short)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5086 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5087 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5088 "value too large to convert to unsigned short");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5089 return (unsigned short)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5090 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5091 return (unsigned short)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5092 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5093 return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5094 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5095
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5096 static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5097 if (sizeof(unsigned int) < sizeof(long)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5098 long val = __Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5099 if (unlikely(val != (long)(unsigned int)val)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5100 if (unlikely(val == -1 && PyErr_Occurred()))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5101 return (unsigned int)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5102 if (unlikely(val < 0)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5103 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5104 "can't convert negative value to unsigned int");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5105 return (unsigned int)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5106 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5107 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5108 "value too large to convert to unsigned int");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5109 return (unsigned int)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5110 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5111 return (unsigned int)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5112 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5113 return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5114 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5115
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5116 static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5117 if (sizeof(char) < sizeof(long)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5118 long val = __Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5119 if (unlikely(val != (long)(char)val)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5120 if (unlikely(val == -1 && PyErr_Occurred()))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5121 return (char)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5122 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5123 "value too large to convert to char");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5124 return (char)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5125 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5126 return (char)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5127 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5128 return (char)__Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5129 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5130
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5131 static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5132 if (sizeof(short) < sizeof(long)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5133 long val = __Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5134 if (unlikely(val != (long)(short)val)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5135 if (unlikely(val == -1 && PyErr_Occurred()))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5136 return (short)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5137 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5138 "value too large to convert to short");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5139 return (short)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5140 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5141 return (short)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5142 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5143 return (short)__Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5144 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5145
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5146 static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5147 if (sizeof(int) < sizeof(long)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5148 long val = __Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5149 if (unlikely(val != (long)(int)val)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5150 if (unlikely(val == -1 && PyErr_Occurred()))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5151 return (int)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5152 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5153 "value too large to convert to int");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5154 return (int)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5155 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5156 return (int)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5157 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5158 return (int)__Pyx_PyInt_AsLong(x);
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5159 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5160
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5161 static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5162 if (sizeof(signed char) < sizeof(long)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5163 long val = __Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5164 if (unlikely(val != (long)(signed char)val)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5165 if (unlikely(val == -1 && PyErr_Occurred()))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5166 return (signed char)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5167 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5168 "value too large to convert to signed char");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5169 return (signed char)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5170 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5171 return (signed char)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5172 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5173 return (signed char)__Pyx_PyInt_AsSignedLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5174 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5175
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5176 static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5177 if (sizeof(signed short) < sizeof(long)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5178 long val = __Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5179 if (unlikely(val != (long)(signed short)val)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5180 if (unlikely(val == -1 && PyErr_Occurred()))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5181 return (signed short)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5182 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5183 "value too large to convert to signed short");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5184 return (signed short)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5185 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5186 return (signed short)val;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5187 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5188 return (signed short)__Pyx_PyInt_AsSignedLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5189 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5190
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5191 static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5192 if (sizeof(signed int) < sizeof(long)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5193 long val = __Pyx_PyInt_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5194 if (unlikely(val != (long)(signed int)val)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5195 if (unlikely(val == -1 && PyErr_Occurred()))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5196 return (signed int)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5197 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5198 "value too large to convert to signed int");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5199 return (signed int)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5200 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5201 return (signed int)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5202 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5203 return (signed int)__Pyx_PyInt_AsSignedLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5204 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5205
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5206 static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5207 #if PY_VERSION_HEX < 0x03000000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5208 if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5209 long val = PyInt_AS_LONG(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5210 if (unlikely(val < 0)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5211 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5212 "can't convert negative value to unsigned long");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5213 return (unsigned long)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5214 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5215 return (unsigned long)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5216 } else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5217 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5218 if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5219 if (unlikely(Py_SIZE(x) < 0)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5220 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5221 "can't convert negative value to unsigned long");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5222 return (unsigned long)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5223 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5224 return PyLong_AsUnsignedLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5225 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5226 unsigned long val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5227 PyObject *tmp = __Pyx_PyNumber_Int(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5228 if (!tmp) return (unsigned long)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5229 val = __Pyx_PyInt_AsUnsignedLong(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5230 Py_DECREF(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5231 return val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5232 }
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5233 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5234
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5235 static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5236 #if PY_VERSION_HEX < 0x03000000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5237 if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5238 long val = PyInt_AS_LONG(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5239 if (unlikely(val < 0)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5240 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5241 "can't convert negative value to unsigned PY_LONG_LONG");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5242 return (unsigned PY_LONG_LONG)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5243 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5244 return (unsigned PY_LONG_LONG)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5245 } else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5246 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5247 if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5248 if (unlikely(Py_SIZE(x) < 0)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5249 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5250 "can't convert negative value to unsigned PY_LONG_LONG");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5251 return (unsigned PY_LONG_LONG)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5252 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5253 return PyLong_AsUnsignedLongLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5254 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5255 unsigned PY_LONG_LONG val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5256 PyObject *tmp = __Pyx_PyNumber_Int(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5257 if (!tmp) return (unsigned PY_LONG_LONG)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5258 val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5259 Py_DECREF(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5260 return val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5261 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5262 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5263
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5264 static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5265 #if PY_VERSION_HEX < 0x03000000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5266 if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5267 long val = PyInt_AS_LONG(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5268 return (long)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5269 } else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5270 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5271 if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5272 return PyLong_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5273 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5274 long val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5275 PyObject *tmp = __Pyx_PyNumber_Int(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5276 if (!tmp) return (long)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5277 val = __Pyx_PyInt_AsLong(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5278 Py_DECREF(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5279 return val;
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5280 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5281 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5282
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5283 static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5284 #if PY_VERSION_HEX < 0x03000000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5285 if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5286 long val = PyInt_AS_LONG(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5287 return (PY_LONG_LONG)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5288 } else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5289 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5290 if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5291 return PyLong_AsLongLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5292 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5293 PY_LONG_LONG val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5294 PyObject *tmp = __Pyx_PyNumber_Int(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5295 if (!tmp) return (PY_LONG_LONG)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5296 val = __Pyx_PyInt_AsLongLong(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5297 Py_DECREF(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5298 return val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5299 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5300 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5301
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5302 static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5303 #if PY_VERSION_HEX < 0x03000000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5304 if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5305 long val = PyInt_AS_LONG(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5306 return (signed long)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5307 } else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5308 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5309 if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5310 return PyLong_AsLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5311 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5312 signed long val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5313 PyObject *tmp = __Pyx_PyNumber_Int(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5314 if (!tmp) return (signed long)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5315 val = __Pyx_PyInt_AsSignedLong(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5316 Py_DECREF(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5317 return val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5318 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5319 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5320
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5321 static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5322 #if PY_VERSION_HEX < 0x03000000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5323 if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5324 long val = PyInt_AS_LONG(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5325 return (signed PY_LONG_LONG)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5326 } else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5327 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5328 if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5329 return PyLong_AsLongLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5330 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5331 signed PY_LONG_LONG val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5332 PyObject *tmp = __Pyx_PyNumber_Int(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5333 if (!tmp) return (signed PY_LONG_LONG)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5334 val = __Pyx_PyInt_AsSignedLongLong(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5335 Py_DECREF(tmp);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5336 return val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5337 }
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5338 }
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5339
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5340 #include "compile.h"
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5341 #include "frameobject.h"
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5342 #include "traceback.h"
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5343
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5344 static void __Pyx_AddTraceback(const char *funcname) {
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5345 PyObject *py_srcfile = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5346 PyObject *py_funcname = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5347 PyObject *py_globals = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5348 PyObject *empty_string = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5349 PyCodeObject *py_code = 0;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5350 PyFrameObject *py_frame = 0;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5351
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5352 #if PY_MAJOR_VERSION < 3
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5353 py_srcfile = PyString_FromString(__pyx_filename);
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5354 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5355 py_srcfile = PyUnicode_FromString(__pyx_filename);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5356 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5357 if (!py_srcfile) goto bad;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5358 if (__pyx_clineno) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5359 #if PY_MAJOR_VERSION < 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5360 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5361 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5362 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5363 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5364 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5365 else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5366 #if PY_MAJOR_VERSION < 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5367 py_funcname = PyString_FromString(funcname);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5368 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5369 py_funcname = PyUnicode_FromString(funcname);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5370 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5371 }
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5372 if (!py_funcname) goto bad;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5373 py_globals = PyModule_GetDict(__pyx_m);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5374 if (!py_globals) goto bad;
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5375 #if PY_MAJOR_VERSION < 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5376 empty_string = PyString_FromStringAndSize("", 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5377 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5378 empty_string = PyBytes_FromStringAndSize("", 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5379 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5380 if (!empty_string) goto bad;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5381 py_code = PyCode_New(
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5382 0, /*int argcount,*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5383 #if PY_MAJOR_VERSION >= 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5384 0, /*int kwonlyargcount,*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5385 #endif
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5386 0, /*int nlocals,*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5387 0, /*int stacksize,*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5388 0, /*int flags,*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5389 empty_string, /*PyObject *code,*/
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5390 __pyx_empty_tuple, /*PyObject *consts,*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5391 __pyx_empty_tuple, /*PyObject *names,*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5392 __pyx_empty_tuple, /*PyObject *varnames,*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5393 __pyx_empty_tuple, /*PyObject *freevars,*/
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5394 __pyx_empty_tuple, /*PyObject *cellvars,*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5395 py_srcfile, /*PyObject *filename,*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5396 py_funcname, /*PyObject *name,*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5397 __pyx_lineno, /*int firstlineno,*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5398 empty_string /*PyObject *lnotab*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5399 );
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5400 if (!py_code) goto bad;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5401 py_frame = PyFrame_New(
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5402 PyThreadState_GET(), /*PyThreadState *tstate,*/
1496
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5403 py_code, /*PyCodeObject *code,*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5404 py_globals, /*PyObject *globals,*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5405 0 /*PyObject *locals*/
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5406 );
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5407 if (!py_frame) goto bad;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5408 py_frame->f_lineno = __pyx_lineno;
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5409 PyTraceBack_Here(py_frame);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5410 bad:
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5411 Py_XDECREF(py_srcfile);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5412 Py_XDECREF(py_funcname);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5413 Py_XDECREF(empty_string);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5414 Py_XDECREF(py_code);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5415 Py_XDECREF(py_frame);
2923af10565c Fixed up some gcc warnings.
Rene Dudfield <renesd@gmail.com>
parents: 1397
diff changeset
5416 }
1815
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5417
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5418 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5419 while (t->p) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5420 #if PY_MAJOR_VERSION < 3
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5421 if (t->is_unicode && (!t->is_identifier)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5422 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5423 } else if (t->intern) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5424 *t->p = PyString_InternFromString(t->s);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5425 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5426 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5427 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5428 #else /* Python 3+ has unicode identifiers */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5429 if (t->is_identifier || (t->is_unicode && t->intern)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5430 *t->p = PyUnicode_InternFromString(t->s);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5431 } else if (t->is_unicode) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5432 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5433 } else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5434 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5435 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5436 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5437 if (!*t->p)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5438 return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5439 ++t;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5440 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5441 return 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5442 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5443
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5444 /* Type Conversion Functions */
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5445
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5446 static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5447 if (x == Py_True) return 1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5448 else if ((x == Py_False) | (x == Py_None)) return 0;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5449 else return PyObject_IsTrue(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5450 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5451
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5452 static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5453 PyNumberMethods *m;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5454 const char *name = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5455 PyObject *res = NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5456 #if PY_VERSION_HEX < 0x03000000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5457 if (PyInt_Check(x) || PyLong_Check(x))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5458 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5459 if (PyLong_Check(x))
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5460 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5461 return Py_INCREF(x), x;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5462 m = Py_TYPE(x)->tp_as_number;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5463 #if PY_VERSION_HEX < 0x03000000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5464 if (m && m->nb_int) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5465 name = "int";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5466 res = PyNumber_Int(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5467 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5468 else if (m && m->nb_long) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5469 name = "long";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5470 res = PyNumber_Long(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5471 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5472 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5473 if (m && m->nb_int) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5474 name = "int";
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5475 res = PyNumber_Long(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5476 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5477 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5478 if (res) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5479 #if PY_VERSION_HEX < 0x03000000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5480 if (!PyInt_Check(res) && !PyLong_Check(res)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5481 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5482 if (!PyLong_Check(res)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5483 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5484 PyErr_Format(PyExc_TypeError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5485 "__%s__ returned non-%s (type %.200s)",
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5486 name, name, Py_TYPE(res)->tp_name);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5487 Py_DECREF(res);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5488 return NULL;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5489 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5490 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5491 else if (!PyErr_Occurred()) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5492 PyErr_SetString(PyExc_TypeError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5493 "an integer is required");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5494 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5495 return res;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5496 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5497
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5498 static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5499 Py_ssize_t ival;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5500 PyObject* x = PyNumber_Index(b);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5501 if (!x) return -1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5502 ival = PyInt_AsSsize_t(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5503 Py_DECREF(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5504 return ival;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5505 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5506
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5507 static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5508 #if PY_VERSION_HEX < 0x02050000
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5509 if (ival <= LONG_MAX)
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5510 return PyInt_FromLong((long)ival);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5511 else {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5512 unsigned char *bytes = (unsigned char *) &ival;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5513 int one = 1; int little = (int)*(unsigned char*)&one;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5514 return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5515 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5516 #else
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5517 return PyInt_FromSize_t(ival);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5518 #endif
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5519 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5520
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5521 static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5522 unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5523 if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5524 return (size_t)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5525 } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5526 PyErr_SetString(PyExc_OverflowError,
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5527 "value too large to convert to size_t");
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5528 return (size_t)-1;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5529 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5530 return (size_t)val;
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5531 }
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5532
c1be6297826e recompile pymp.pyx with Cython. Enable Python 3.x support of midi module
Lenard Lindstrom <len-l@telus.net>
parents: 1496
diff changeset
5533