Generated by Cython 0.29.2
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(0, 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;
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:
025: #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname)
+026: cdef pvdata data = PVDataHolderToStruct(pvd)
__pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_data = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_1); __pyx_t_1 = 0;
027: #data.show()
028:
+029: py_cb = <object>(<void *> callback)
__pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback)); __Pyx_INCREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb); __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0;
030: #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname)
031: cdef HandleHelper hh
+032: mpid = hh.getUsrArgsAsUInt(handle)
__pyx_v_mpid = __pyx_v_hh.getUsrArgsAsUInt(__pyx_v_handle);
033: #print("monitorId", mpid)
034: #monDictGlobal[mpid](handle, pvname, data)
+035: <object>py_cb(handle, pvname, data)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __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(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_6PyCafe_py_cb); __pyx_t_4 = __pyx_v_6PyCafe_py_cb; __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(0, 35, __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(0, 35, __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(0, 35, __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(0, 35, __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; (void)(((PyObject *)__pyx_t_1)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
036:
+037: if monDictGlobal[mpid] != <object>py_cb:
if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 37, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_6PyCafe_py_cb, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 37, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_8) {
/* … */
}
+038: print( monDictGlobal[mpid])
if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 38, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+039: print( <object>py_cb)
__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_6PyCafe_py_cb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
040: '''
041: if pvname == b"SARCL01-MQUA100:I-READ":
042: data.show()
043: print(pvname, handle)
044:
045: if hmd is not None:
046: for cbobjt, v in hmd.items():
047:
048: if v == handle:
049: #print("fire")
050: if pvname == b"SARCL01-MQUA100:I-READ":
051: print("handle", v, "cbobjt", cbobjt)
052: #####cbobjt(handle, pvname, data)
053: monDictGlobal[mpid](handle,pvname,data)
054:
055: #print("fired")
056: '''
057: '''
058: global handleMonDictGlobal
059: if handleMonDictGlobal is not None:
060: for cbobjt, v in handleMonDictGlobal.items():
061: print("handle", v, "cbobjt", cbobjt)
062: if v == handle:
063: cbobjt(handle, pvname, data)
064: '''
065: '''
066: if callback:
067: cbobjt=<object> (<void *> callback)
068: print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(3)= Handle/PVNAME :", handle, pvname)
069: cbobjt(handle, pvname, data)
070: print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(4)= Handle/PVNAME :", handle, pvname)
071: '''
072:
+073: 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:;
}
}
+074: return
goto __pyx_L4_return;
}
075:
076:
+077: 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
}
078: unsigned int handle,
079: string pvname,
080: PVCtrlHolder pvc) with gil:
081:
082: #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname)
+083: cdef pvctrl data = PVCtrlHolderToStruct(pvc)
__pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_data = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_1); __pyx_t_1 = 0;
+084: 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;
+085: cbobjt(handle, pvname, data)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __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(0, 85, __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(0, 85, __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(0, 85, __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(0, 85, __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(0, 85, __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;
+086: 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:;
}
}
+087: return
goto __pyx_L3_return;
}
088:
089: #cdef public void cy_event_handler_wrapper(void *callback, int *args, string pvname) with gil:
+090: 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
}
091: unsigned int handle,
092: string pvname) with gil:
093: #print(" cy_event_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle/PVNAME :", handle, pvname)
094: #(<object>args[0])(<int>args[1], <string>args[2])
+095: 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;
096: #cbobjt=<object>args[0]
+097: cbobjt(handle, pvname)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __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(0, 97, __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(0, 97, __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(0, 97, __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(0, 97, __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(0, 97, __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;
098: #cbobjt=<object>(<int>args[0], pvname)
099:
+100: 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:;
}
}
+101: return
goto __pyx_L3_return;
}
102:
+103: 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
}
104: unsigned int handle) with gil:
105: #print(" cy_handle_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle:", handle)
106:
+107: 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;
+108: cbobjt(handle)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __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(0, 108, __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;
+109: 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:;
}
}
+110: return
goto __pyx_L3_return;
}
111:
+112: 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
}
113: unsigned int handle,
114: string pvname,
115: int status) with gil:
116: #print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)
117: #print(" callback is ", <object> callback)
118:
+119: if callback:
__pyx_t_1 = (__pyx_v_callback != 0);
if (__pyx_t_1) {
/* … */
}
120: #print(" callback is not None ")
+121: 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;
122:
+123: cbobjt(handle, pvname, status)
__pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __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(0, 123, __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(0, 123, __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(0, 123, __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(0, 123, __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(0, 123, __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(0, 123, __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;
124: #print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++ SUCCESS")
125: #else:
126: # if str(pvname) in openDictGlobal.keys():
127: # cbobjt = openDictGlobal[pvname]
128: # cbobjt(handle, pvname, status)
129:
+130: 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:;
}
}
+131: return
goto __pyx_L4_return;
}
132:
133:
134:
+135: cdef public void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil:
void py_cb_wrapper(PVDataHolder __pyx_v_pvd, CYTHON_UNUSED unsigned int __pyx_v_handle, CYTHON_UNUSED std::string __pyx_v_pvname) {
CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvdata *__pyx_v_pv1 = 0;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("py_cb_wrapper", 0);
/* … */
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_WriteUnraisable("PyCafe.py_cb_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_pv1);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
136: #print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname)
+137: cdef pvdata pv1 = PVDataHolderToStruct(pvd)
__pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_pv1 = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_1); __pyx_t_1 = 0;
138:
139:
140: '''
141: cdef string val
142: _c_cafe.getCacheString(handle, val)
143: #print(val, " ", pv1.value[0])
144:
145: cdef HandleHelper hh
146: cdef vector[void *] widgetV
147: widgetV.reserve(2)
148: widgetList = []
149: status = hh.getWidgets(handle, widgetV)
150: for i in range(0, widgetV.size()):
151: cbobjt = < object > widgetV[i]
152: cbobjt(pv1, handle, pvname)
153: widgetList.append( < object > widgetV[i])
154:
155: #print(widgetList)
156: '''
157: '''
158: global handleMonDictGlobal
159: if handleMonDictGlobal is not None:
160: for cbobjt, v in handleMonDictGlobal.items():
161: print("handle", v, "cbobjt", cbobjt)
162: if v == handle:
163: cbobjt(pv1, handle, pvname)
164: '''
+165: 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:;
}
}
+166: return
goto __pyx_L3_return;
}
167:
168:
+169: cdef public void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil:
void py_cb_ctrl_wrapper(PVCtrlHolder __pyx_v_pvc, CYTHON_UNUSED unsigned int __pyx_v_handle, CYTHON_UNUSED std::string __pyx_v_pvname) {
CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_c1 = 0;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("py_cb_ctrl_wrapper", 0);
/* … */
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_WriteUnraisable("PyCafe.py_cb_ctrl_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_c1);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
170: #print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname)
+171: cdef pvctrl c1 = PVCtrlHolderToStruct(pvc)
__pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_c1 = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_1); __pyx_t_1 = 0;
172: '''
173: global handleMonDictGlobal
174: cdef object cbobjt = None
175: for cbobjt, v in handleMonDictGlobal.items():
176: if v == handle:
177: cbobjt(c1, handle, pvname)
178: '''
+179: 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:;
}
}
+180: return
goto __pyx_L3_return;
}
181:
+182: cdef public void py_cb_handle_wrapper(unsigned int handle) with gil:
void py_cb_handle_wrapper(unsigned int __pyx_v_handle) {
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("py_cb_handle_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.py_cb_handle_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
+183: print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle)
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_py_cb_handle_wrapper_HANDLE_Han); __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_wrapper_HANDLE_Han); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_py_cb_handle_wrapper_HANDLE_Han); __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(0, 183, __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;
+184: py_cb_handle(handle)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_6PyCafe_py_cb_handle); __pyx_t_3 = __pyx_v_6PyCafe_py_cb_handle; __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(0, 184, __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;
+185: 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:;
}
}
+186: return
goto __pyx_L3_return;
}
187:
188:
189: # Default
+190: cdef public void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil:
void py_cb_handle_monid_wrapper(unsigned int __pyx_v_handle, unsigned long __pyx_v_monid) {
PyObject *__pyx_v_cbobjt = NULL;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("py_cb_handle_monid_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_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_WriteUnraisable("PyCafe.py_cb_handle_monid_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
}
+191: print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle)
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_py_cb_handle_monid_wrapper_MONI); __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_monid_wrapper_MONI); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_py_cb_handle_monid_wrapper_MONI); __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(0, 191, __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;
192:
193: '''
194: cdef string val
195: _c_cafe.getCacheString(handle, val)
196: print(val, " is val")
197: '''
198:
199: # if monDictGlobal.has_key(monid):
200: global monDictGlobal
+201: if monid in monDictGlobal.keys():
__pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_monid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); __PYX_ERR(0, 201, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_monDictGlobal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* … */ goto __pyx_L3; }
+202: cbobjt = monDictGlobal[monid]
if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 202, __pyx_L1_error)
}
__pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_monid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_cbobjt = __pyx_t_1;
__pyx_t_1 = 0;
+203: cbobjt(handle)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_5 = __pyx_v_cbobjt; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
204: else:
+205: print("CALLBACK NOT FOUND FOR handle/monid", handle, monid)
/*else*/ {
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_5 = __Pyx_PyInt_From_unsigned_long(__pyx_v_monid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_kp_u_CALLBACK_NOT_FOUND_FOR_handle_mo);
__Pyx_GIVEREF(__pyx_kp_u_CALLBACK_NOT_FOUND_FOR_handle_mo);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_CALLBACK_NOT_FOUND_FOR_handle_mo);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
__pyx_t_1 = 0;
__pyx_t_5 = 0;
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__pyx_L3:;
+206: 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:;
}
}
+207: return
goto __pyx_L4_return;
}
208:
209:
+210: 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
}
+211: 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(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __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(0, 211, __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;
+212: 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;
+213: cbobjt(handle)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __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(0, 213, __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;
+214: 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:;
}
}
+215: return
goto __pyx_L3_return;
}
216:
217:
+218: cdef public void py_cb_handle_get_wrapper(unsigned int handle) with gil:
void py_cb_handle_get_wrapper(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("py_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_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_WriteUnraisable("PyCafe.py_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
}
+219: 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(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __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(0, 219, __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;
220: # py_cb_handle_get(handle)
221: global getDictGlobal
+222: if handle in getDictGlobal.keys():
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_6PyCafe_getDictGlobal == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); __PYX_ERR(0, 222, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_getDictGlobal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* … */ goto __pyx_L3; }
+223: cbobjt = getDictGlobal[handle]
if (unlikely(__pyx_v_6PyCafe_getDictGlobal == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 223, __pyx_L1_error)
}
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_getDictGlobal, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_cbobjt = __pyx_t_1;
__pyx_t_1 = 0;
+224: cbobjt(handle)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_5 = __pyx_v_cbobjt; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
225: else:
+226: print("GET CALLBACK NOT FOUND FOR handle", handle)
/*else*/ {
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_kp_u_GET_CALLBACK_NOT_FOUND_FOR_handl);
__Pyx_GIVEREF(__pyx_kp_u_GET_CALLBACK_NOT_FOUND_FOR_handl);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_GET_CALLBACK_NOT_FOUND_FOR_handl);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
__pyx_t_1 = 0;
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
__pyx_L3:;
227:
+228: 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:;
}
}
+229: return
goto __pyx_L4_return;
}
230:
231:
+232: 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
}
+233: print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle)
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_py_cb_handle_put_wrapper_PUT_Ha); __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_put_wrapper_PUT_Ha); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_py_cb_handle_put_wrapper_PUT_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(0, 233, __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;
234:
+235: 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;
236:
+237: cbobjt(handle)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __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(0, 237, __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;
+238: 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:;
}
}
+239: return
goto __pyx_L3_return;
}
240:
241:
+242: cdef public void py_cb_handle_put_wrapper(unsigned int handle) with gil:
void py_cb_handle_put_wrapper(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("py_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_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_WriteUnraisable("PyCafe.py_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
}
243: #print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle)
244: # py_cb_handle_put(handle)
245: global putDictGlobal
+246: if handle in putDictGlobal.keys():
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_6PyCafe_putDictGlobal == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); __PYX_ERR(0, 246, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_putDictGlobal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* … */ goto __pyx_L3; }
+247: cbobjt = putDictGlobal[handle]
if (unlikely(__pyx_v_6PyCafe_putDictGlobal == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 247, __pyx_L1_error)
}
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_putDictGlobal, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_cbobjt = __pyx_t_1;
__pyx_t_1 = 0;
+248: cbobjt(handle)
__pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_5 = __pyx_v_cbobjt; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
249: else:
+250: print("PUT CALLBACK NOT FOUND FOR handle", handle)
/*else*/ {
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_kp_u_PUT_CALLBACK_NOT_FOUND_FOR_handl);
__Pyx_GIVEREF(__pyx_kp_u_PUT_CALLBACK_NOT_FOUND_FOR_handl);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_PUT_CALLBACK_NOT_FOUND_FOR_handl);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
__pyx_t_1 = 0;
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
__pyx_L3:;
251:
+252: 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:;
}
}
+253: return
goto __pyx_L4_return;
}
254:
255:
+256: cdef public void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil:
void py_cb_handle_open_wrapper(unsigned int __pyx_v_handle, int __pyx_v_status) {
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("py_cb_handle_open_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.py_cb_handle_open_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
257: # status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604)
+258: print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status)
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_u_py_cb_handle_open_wrapper_OPEN); __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_open_wrapper_OPEN); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_py_cb_handle_open_wrapper_OPEN); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+259: py_cb_handle_open(handle, status)
__pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_6PyCafe_py_cb_handle_open); __pyx_t_4 = __pyx_v_6PyCafe_py_cb_handle_open; __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_3, __pyx_t_1}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_1}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __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_1); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+260: 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:;
}
}
+261: return
goto __pyx_L3_return;
}
262:
+263: cdef public void py_cb_handle_connect_wrapper(unsigned int handle,
void py_cb_handle_connect_wrapper(unsigned int __pyx_v_handle, std::string __pyx_v_pvname, int __pyx_v_status) {
PyObject *__pyx_v_k = NULL;
PyObject *__pyx_v_y = NULL;
PyObject *__pyx_v_cbobjt = NULL;
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("py_cb_handle_connect_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_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
__Pyx_WriteUnraisable("PyCafe.py_cb_handle_connect_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_k);
__Pyx_XDECREF(__pyx_v_y);
__Pyx_XDECREF(__pyx_v_cbobjt);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
__Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
264: string pvname,
265: int status) with gil:
+266: print(" py_cb_handle_connect_wrapper ===========================+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)
__pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_u_py_cb_handle_connect_wrapper_CO); __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_connect_wrapper_CO); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_py_cb_handle_connect_wrapper_CO); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
267: #py_cb_handle_connect(handle, pvname, status)
268: global openDictGlobal
+269: for k, y in openDictGlobal.items():
__pyx_t_5 = 0;
if (unlikely(__pyx_v_6PyCafe_openDictGlobal == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
__PYX_ERR(0, 269, __pyx_L1_error)
}
__pyx_t_4 = __Pyx_dict_iterator(__pyx_v_6PyCafe_openDictGlobal, 1, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_3);
__pyx_t_3 = __pyx_t_4;
__pyx_t_4 = 0;
while (1) {
__pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_6, &__pyx_t_5, &__pyx_t_4, &__pyx_t_2, NULL, __pyx_t_7);
if (unlikely(__pyx_t_8 == 0)) break;
if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 269, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_2);
__Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4);
__pyx_t_4 = 0;
__Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_2);
__pyx_t_2 = 0;
+270: print(k, y)
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_k); __Pyx_GIVEREF(__pyx_v_k); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k); __Pyx_INCREF(__pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_y); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
271: # if openDictGlobal.has_key(pvname):
+272: if str(pvname) in openDictGlobal.keys():
__pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_v_6PyCafe_openDictGlobal == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); __PYX_ERR(0, 272, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_openDictGlobal); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { /* … */ }
+273: cbobjt = openDictGlobal[pvname]
if (unlikely(__pyx_v_6PyCafe_openDictGlobal == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 273, __pyx_L1_error)
}
__pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_openDictGlobal, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_cbobjt = __pyx_t_4;
__pyx_t_4 = 0;
+274: cbobjt(handle, pvname, status)
__pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_cbobjt); __pyx_t_11 = __pyx_v_cbobjt; __pyx_t_12 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_t_3, __pyx_t_2, __pyx_t_1}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_t_3, __pyx_t_2, __pyx_t_1}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_13 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_7, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+275: 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_L8;
}
__pyx_L6_return: {
#ifdef WITH_THREAD
__Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L0;
}
__pyx_L8:;
}
}
+276: return
goto __pyx_L6_return;
}
277:
278:
279: # ***********public***************