mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-05 06:01:36 +00:00
refactor: module -> module_ with typedef (#2544)
* WIP: module -> module_ without typedef * refactor: allow py::module to work again
This commit is contained in:
@@ -222,7 +222,7 @@ private:
|
||||
};
|
||||
|
||||
static npy_api lookup() {
|
||||
module_ m = module::import("numpy.core.multiarray");
|
||||
module_ m = module_::import("numpy.core.multiarray");
|
||||
auto c = m.attr("_ARRAY_API");
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
void **api_ptr = (void **) PyCapsule_GetPointer(c.ptr(), NULL);
|
||||
@@ -505,7 +505,7 @@ public:
|
||||
|
||||
private:
|
||||
static object _dtype_from_pep3118() {
|
||||
static PyObject *obj = module::import("numpy.core._internal")
|
||||
static PyObject *obj = module_::import("numpy.core._internal")
|
||||
.attr("_dtype_from_pep3118").cast<object>().release().ptr();
|
||||
return reinterpret_borrow<object>(obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user