debug
This commit is contained in:
parent
99f6c1fce3
commit
34b1c30424
|
@ -57,11 +57,14 @@ public:
|
|||
return instance;
|
||||
}
|
||||
static void** numpy_api() {
|
||||
static void** api = [](){
|
||||
// 延迟获取实际指针
|
||||
return reinterpret_cast<void**>(RTC_PLUGINS_ARRAY_API);
|
||||
}();
|
||||
return api;
|
||||
void** ptr = reinterpret_cast<void**>(RTC_PLUGINS_ARRAY_API);
|
||||
|
||||
// 深度验证API有效性
|
||||
if (!ptr || !ptr[93]) { // 93是PyArray_SimpleNew的偏移量
|
||||
PyErr_Print();
|
||||
throw std::runtime_error("Invalid NumPy API structure");
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
RTCContext(const RTCContext&) = delete;
|
||||
RTCContext& operator=(const RTCContext&) = delete;
|
||||
|
|
Loading…
Reference in New Issue