Generated by Cython 0.29.30
Yellow lines hint at Python interaction.
Click on a line that starts with a "+" to see the C code that Cython generated for it.
Raw output: PyCafeDefs_pub.pxi
001:
+002: cdef object py_cb_handle = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb_handle); __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb_handle, Py_None); __Pyx_GIVEREF(Py_None);
+003: cdef object py_cb_handle_open = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb_handle_open); __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb_handle_open, Py_None); __Pyx_GIVEREF(Py_None);
004:
+005: cdef object cbobjt = None
/* "PyCafeDefs_pub.pxi":5 * cdef object py_cb_handle_open = None * * cdef object cbobjt = None # <<<<<<<<<<<<<< * * # ***********public or api*************** */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6PyCafe_cbobjt); __Pyx_DECREF_SET(__pyx_v_6PyCafe_cbobjt, Py_None); __Pyx_GIVEREF(Py_None);
006:
007: # ***********public or api***************
008: # For when with pvdata
009:
010:
+011: cdef public void cy_monitor_handler_wrapper(void * callback) with gil:
void cy_monitor_handler_wrapper(void *__pyx_v_callback) {
PyObject *__pyx_v_cbobjt = NULL;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("cy_monitor_handler_wrapper", 0);
/* … */
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_WriteUnraisable("PyCafe.cy_monitor_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_cbobjt);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
+012: cbobjt=<object> (<void *> callback)
__pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback));
__Pyx_INCREF(__pyx_t_1);
__pyx_v_cbobjt = __pyx_t_1;
__pyx_t_1 = 0;
+013: cbobjt()
__Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_2 = __pyx_v_cbobjt; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+014: with nogil:
{
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
__Pyx_FastGIL_Remember();
#endif
/*try:*/ {
/* … */
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
}
__pyx_L3_return: {
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L0;
}
__pyx_L5:;
}
}
+015: return
goto __pyx_L3_return;
}
016:
017:
+018: cdef public void cy_data_event_handler_wrapper(void * callback,
void cy_data_event_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname, PVDataHolder __pyx_v_pvd) {
struct __pyx_obj_6PyCafe_pvdata *__pyx_v_data = 0;
HandleHelper __pyx_v_hh;
CYTHON_UNUSED unsigned int __pyx_v_mpid;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("cy_data_event_handler_wrapper", 0);
/* … */
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_WriteUnraisable("PyCafe.cy_data_event_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_data);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
019: unsigned int handle,
020: string pvname,
021: PVDataHolder pvd) with gil:
022:
023: global py_cb
024: #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname)
+025: cdef pvdata data = PVDataHolderToStruct(pvd)
__pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_data = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_1); __pyx_t_1 = 0;
026: #data.show()
+027: py_cb = <object>(<void *> callback)
__pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback)); __Pyx_INCREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_py_cb, __pyx_t_1) < 0) __PYX_ERR(3, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
028: #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname)
029: cdef HandleHelper hh
+030: mpid = hh.getUsrArgsAsUInt(handle)
__pyx_v_mpid = __pyx_v_hh.getUsrArgsAsUInt(__pyx_v_handle);
031: #print("monitorId", mpid)
032: #monDictGlobal[mpid](handle, pvname, data)
+033: <object>py_cb(handle, pvname, data)
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_py_cb); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_data)}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_data)}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_data)); __Pyx_GIVEREF(((PyObject *)__pyx_v_data)); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)__pyx_v_data)); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (void)(((PyObject *)__pyx_t_1)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
034:
035: #if monDictGlobal[mpid] != <object>py_cb:
036: # print( monDictGlobal[mpid])
037: # print( <object>py_cb)
038:
+039: with nogil:
{
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
__Pyx_FastGIL_Remember();
#endif
/*try:*/ {
/* … */
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
}
__pyx_L3_return: {
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L0;
}
__pyx_L5:;
}
}
+040: return
goto __pyx_L3_return;
}
041:
042:
+043: cdef public void cy_ctrl_event_handler_wrapper(void * callback,
void cy_ctrl_event_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname, PVCtrlHolder __pyx_v_pvc) {
struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_data = 0;
PyObject *__pyx_v_cbobjt = NULL;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("cy_ctrl_event_handler_wrapper", 0);
/* … */
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_WriteUnraisable("PyCafe.cy_ctrl_event_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_data);
__Pyx_XDECREF(__pyx_v_cbobjt);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
044: unsigned int handle,
045: string pvname,
046: PVCtrlHolder pvc) with gil:
047:
048: #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname)
+049: cdef pvctrl data = PVCtrlHolderToStruct(pvc)
__pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_data = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_1); __pyx_t_1 = 0;
+050: cbobjt=<object> (<void *> callback)
__pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback));
__Pyx_INCREF(__pyx_t_1);
__pyx_v_cbobjt = __pyx_t_1;
__pyx_t_1 = 0;
+051: cbobjt(handle, pvname, data)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_4 = __pyx_v_cbobjt; __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_data)}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_data)}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_data)); __Pyx_GIVEREF(((PyObject *)__pyx_v_data)); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)__pyx_v_data)); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+052: with nogil:
{
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
__Pyx_FastGIL_Remember();
#endif
/*try:*/ {
/* … */
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
}
__pyx_L3_return: {
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L0;
}
__pyx_L5:;
}
}
+053: return
goto __pyx_L3_return;
}
054:
055:
+056: cdef public void cy_event_handler_wrapper(void * callback,
void cy_event_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname) {
PyObject *__pyx_v_cbobjt = NULL;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("cy_event_handler_wrapper", 0);
/* … */
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_WriteUnraisable("PyCafe.cy_event_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_cbobjt);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
057: unsigned int handle,
058: string pvname) with gil:
059: #print(" cy_event_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle/PVNAME :", handle, pvname)
060: #(<object>args[0])(<int>args[1], <string>args[2])
+061: cbobjt=<object> callback
__pyx_t_1 = ((PyObject *)__pyx_v_callback);
__Pyx_INCREF(__pyx_t_1);
__pyx_v_cbobjt = __pyx_t_1;
__pyx_t_1 = 0;
062: #cbobjt=<object>args[0]
+063: cbobjt(handle, pvname)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_4 = __pyx_v_cbobjt; __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 63, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 63, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
064: #cbobjt=<object>(<int>args[0], pvname)
065:
+066: with nogil:
{
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
__Pyx_FastGIL_Remember();
#endif
/*try:*/ {
/* … */
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
}
__pyx_L3_return: {
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L0;
}
__pyx_L5:;
}
}
+067: return
goto __pyx_L3_return;
}
068:
+069: cdef public void cy_handle_handler_wrapper(void * callback,
void cy_handle_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle) {
PyObject *__pyx_v_cbobjt = NULL;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("cy_handle_handler_wrapper", 0);
/* … */
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_WriteUnraisable("PyCafe.cy_handle_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_cbobjt);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
070: unsigned int handle) with gil:
071: #print(" cy_handle_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle:", handle)
072:
+073: cbobjt=<object> callback
__pyx_t_1 = ((PyObject *)__pyx_v_callback);
__Pyx_INCREF(__pyx_t_1);
__pyx_v_cbobjt = __pyx_t_1;
__pyx_t_1 = 0;
+074: cbobjt(handle)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_3 = __pyx_v_cbobjt; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+075: with nogil:
{
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
__Pyx_FastGIL_Remember();
#endif
/*try:*/ {
/* … */
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
}
__pyx_L3_return: {
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L0;
}
__pyx_L5:;
}
}
+076: return
goto __pyx_L3_return;
}
077:
+078: cdef public void cy_connect_handler_wrapper(void * callback,
void cy_connect_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname, int __pyx_v_status) {
PyObject *__pyx_v_cbobjt = NULL;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("cy_connect_handler_wrapper", 0);
/* … */
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_WriteUnraisable("PyCafe.cy_connect_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_cbobjt);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
079: unsigned int handle,
080: string pvname,
081: int status) with gil:
082: #print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)
083: #print(" callback is ", <object> callback)
084:
+085: if callback:
__pyx_t_1 = (__pyx_v_callback != 0);
if (__pyx_t_1) {
/* … */
}
+086: cbobjt=<object> callback
__pyx_t_2 = ((PyObject *)__pyx_v_callback);
__Pyx_INCREF(__pyx_t_2);
__pyx_v_cbobjt = __pyx_t_2;
__pyx_t_2 = 0;
+087: cbobjt(handle, pvname, status)
__pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_6 = __pyx_v_cbobjt; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
088:
+089: with nogil:
{
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
__Pyx_FastGIL_Remember();
#endif
/*try:*/ {
/* … */
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L6;
}
__pyx_L4_return: {
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L0;
}
__pyx_L6:;
}
}
+090: return
goto __pyx_L4_return;
}
091:
092:
+093: cdef public void cy_cb_handle_get_wrapper(void * callback, unsigned int handle) with gil:
void cy_cb_handle_get_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle) {
PyObject *__pyx_v_cbobjt = NULL;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("cy_cb_handle_get_wrapper", 0);
/* … */
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_WriteUnraisable("PyCafe.cy_cb_handle_get_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_cbobjt);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
+094: print(" py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:", handle)
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_py_cb_handle_get_wrapper_GET_Ha); __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_get_wrapper_GET_Ha); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_py_cb_handle_get_wrapper_GET_Ha); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+095: cbobjt=<object> (<void *> callback)
__pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback));
__Pyx_INCREF(__pyx_t_1);
__pyx_v_cbobjt = __pyx_t_1;
__pyx_t_1 = 0;
+096: cbobjt(handle)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_3 = __pyx_v_cbobjt; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+097: with nogil:
{
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
__Pyx_FastGIL_Remember();
#endif
/*try:*/ {
/* … */
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
}
__pyx_L3_return: {
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L0;
}
__pyx_L5:;
}
}
+098: return
goto __pyx_L3_return;
}
099:
100:
+101: cdef public void cy_cb_handle_put_wrapper(void * callback, unsigned int handle) with gil:
void cy_cb_handle_put_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle) {
PyObject *__pyx_v_cbobjt = NULL;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("cy_cb_handle_put_wrapper", 0);
/* … */
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_WriteUnraisable("PyCafe.cy_cb_handle_put_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_cbobjt);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
102: #print(" py_cb_handle_put_wrapper+++++++++++++PUT++++++++++= Handle:", handle)
+103: cbobjt=<object> (<void *> callback)
__pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback));
__Pyx_INCREF(__pyx_t_1);
__pyx_v_cbobjt = __pyx_t_1;
__pyx_t_1 = 0;
+104: cbobjt(handle)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_3 = __pyx_v_cbobjt; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+105: with nogil:
{
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
__Pyx_FastGIL_Remember();
#endif
/*try:*/ {
/* … */
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
}
__pyx_L3_return: {
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L0;
}
__pyx_L5:;
}
}
+106: return
goto __pyx_L3_return;
}
107:
108:
109: # ***********public***************