@@ -249,7 +249,7 @@ int PyWrapper::wrapperFini() {
249
249
}
250
250
251
251
int PyWrapper::wrapperOnceExec (const char *usrTag, std::map <std::string, std::string> params, DataListCls reqData,
252
- pDataList *respData, std::string sid, wrapperCallback cb, unsigned int psrId ) {
252
+ pDataList *respData, std::string sid, wrapperCallback cb, unsigned int psrId) {
253
253
SetSidUsrTag (sid, usrTag);
254
254
try {
255
255
if (cb != nullptr ) {
@@ -305,7 +305,7 @@ int PyWrapper::wrapperOnceExec(const char *usrTag, std::map <std::string, std::s
305
305
// strdup(.c_str());
306
306
tmpData->data = pr;
307
307
// tmpData->status = DataStatus(itemData.status);
308
- tmpData -> status = DataOnce;
308
+ tmpData-> status = DataOnce;
309
309
if (idx == 0 ) {
310
310
headPtr = tmpData;
311
311
curPtr = tmpData;
@@ -556,12 +556,15 @@ int PyWrapper::wrapperLoadRes(pDataList p, unsigned int resId) {
556
556
}
557
557
py::gil_scoped_acquire acquire;
558
558
// 执行python exec 推理
559
- py::object r = _wrapperLoadRes (perData, resId);
560
- return 0 ;
559
+ int ret = _wrapperLoadRes (perData, resId). cast < int >(); ;
560
+ return ret ;
561
561
}
562
562
563
563
int PyWrapper::wrapperUnloadRes (unsigned int resId) {
564
- return 0 ;
564
+ py::gil_scoped_acquire acquire;
565
+ // 执行python exec 推理
566
+ int ret = _wrapperUnloadRes (resId).cast <int >();;
567
+ return ret;
565
568
}
566
569
567
570
int PyWrapper::wrapperTest () {
0 commit comments