|
13 | 13 | #define SWIGPYTHON
|
14 | 14 | #endif
|
15 | 15 |
|
| 16 | +#define SWIG_PYTHON_THREADS |
16 | 17 | #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
|
17 | 18 |
|
18 | 19 | /* -----------------------------------------------------------------------------
|
@@ -3132,6 +3133,12 @@ SWIG_FromCharPtr(const char *cptr)
|
3132 | 3133 | return &ws->channel[channelnum];
|
3133 | 3134 | }
|
3134 | 3135 |
|
| 3136 | + |
| 3137 | + ws2811_return_t ws2811_render_nogil(ws2811_t *ws2811) |
| 3138 | + { |
| 3139 | + return ws2811_render(ws2811); |
| 3140 | + } |
| 3141 | + |
3135 | 3142 | #ifdef __cplusplus
|
3136 | 3143 | extern "C" {
|
3137 | 3144 | #endif
|
@@ -4370,6 +4377,33 @@ SWIGINTERN PyObject *_wrap_ws2811_channel_get(PyObject *SWIGUNUSEDPARM(self), Py
|
4370 | 4377 | }
|
4371 | 4378 |
|
4372 | 4379 |
|
| 4380 | +SWIGINTERN PyObject *_wrap_ws2811_render_nogil(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { |
| 4381 | + PyObject *resultobj = 0; |
| 4382 | + ws2811_t *arg1 = (ws2811_t *) 0 ; |
| 4383 | + void *argp1 = 0 ; |
| 4384 | + int res1 = 0 ; |
| 4385 | + PyObject *swig_obj[1] ; |
| 4386 | + ws2811_return_t result; |
| 4387 | + |
| 4388 | + if (!args) SWIG_fail; |
| 4389 | + swig_obj[0] = args; |
| 4390 | + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ws2811_t, 0 | 0 ); |
| 4391 | + if (!SWIG_IsOK(res1)) { |
| 4392 | + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ws2811_render_nogil" "', argument " "1"" of type '" "ws2811_t *""'"); |
| 4393 | + } |
| 4394 | + arg1 = (ws2811_t *)(argp1); |
| 4395 | + { |
| 4396 | + SWIG_PYTHON_THREAD_BEGIN_ALLOW; |
| 4397 | + result = (ws2811_return_t)ws2811_render_nogil(arg1); |
| 4398 | + SWIG_PYTHON_THREAD_END_ALLOW; |
| 4399 | + } |
| 4400 | + resultobj = SWIG_From_int((int)(result)); |
| 4401 | + return resultobj; |
| 4402 | +fail: |
| 4403 | + return NULL; |
| 4404 | +} |
| 4405 | + |
| 4406 | + |
4373 | 4407 | static PyMethodDef SwigMethods[] = {
|
4374 | 4408 | { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
|
4375 | 4409 | { "ws2811_channel_t_gpionum_set", _wrap_ws2811_channel_t_gpionum_set, METH_VARARGS, NULL},
|
@@ -4423,6 +4457,7 @@ static PyMethodDef SwigMethods[] = {
|
4423 | 4457 | { "ws2811_led_get", _wrap_ws2811_led_get, METH_VARARGS, NULL},
|
4424 | 4458 | { "ws2811_led_set", _wrap_ws2811_led_set, METH_VARARGS, NULL},
|
4425 | 4459 | { "ws2811_channel_get", _wrap_ws2811_channel_get, METH_VARARGS, NULL},
|
| 4460 | + { "ws2811_render_nogil", _wrap_ws2811_render_nogil, METH_O, NULL}, |
4426 | 4461 | { NULL, NULL, 0, NULL }
|
4427 | 4462 | };
|
4428 | 4463 |
|
@@ -5263,6 +5298,9 @@ SWIG_init(void) {
|
5263 | 5298 | SWIG_Python_SetConstant(d, "WS2811_ERROR_SPI_SETUP",SWIG_From_int((int)(WS2811_ERROR_SPI_SETUP)));
|
5264 | 5299 | SWIG_Python_SetConstant(d, "WS2811_ERROR_SPI_TRANSFER",SWIG_From_int((int)(WS2811_ERROR_SPI_TRANSFER)));
|
5265 | 5300 | SWIG_Python_SetConstant(d, "WS2811_RETURN_STATE_COUNT",SWIG_From_int((int)(WS2811_RETURN_STATE_COUNT)));
|
| 5301 | + |
| 5302 | + /* Initialize threading */ |
| 5303 | + SWIG_PYTHON_INITIALIZE_THREADS; |
5266 | 5304 | #if PY_VERSION_HEX >= 0x03000000
|
5267 | 5305 | return m;
|
5268 | 5306 | #else
|
|
0 commit comments