debug
This commit is contained in:
parent
0228402b5b
commit
b6a33bcfbd
|
@ -60,25 +60,7 @@ public:
|
|||
static RTCContext instance;
|
||||
return instance;
|
||||
}
|
||||
static void** numpy_api() {
|
||||
static void** api = [](){
|
||||
// 强制初始化NumPy
|
||||
if (_import_array() < 0) {
|
||||
PyErr_Print();
|
||||
throw std::runtime_error("NumPy initialization failed");
|
||||
}
|
||||
|
||||
void** ptr = reinterpret_cast<void**>(RTC_PLUGINS_ARRAY_API);
|
||||
std::cout << "ptr:" << ptr << std::endl;
|
||||
if (!ptr || !ptr[93]) {
|
||||
std::cerr << "NumPy API corrupt! Expected at 93: "
|
||||
<< (ptr ? (void*)ptr[93] : nullptr) << std::endl;
|
||||
abort();
|
||||
}
|
||||
return ptr;
|
||||
}();
|
||||
return api;
|
||||
}
|
||||
RTCContext(const RTCContext&) = delete;
|
||||
RTCContext& operator=(const RTCContext&) = delete;
|
||||
mrtc::IMRTCEngine* getRtcEngine() const;
|
||||
|
|
Loading…
Reference in New Issue