mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
parent
df8494dc86
commit
40931961e3
@ -112,7 +112,7 @@ struct internals {
|
||||
PyInterpreterState *istate = nullptr;
|
||||
~internals() {
|
||||
// This destructor is called *after* Py_Finalize() in finalize_interpreter().
|
||||
// That *SHOULD BE* fine. The following details what happens whe PyThread_tss_free is called.
|
||||
// That *SHOULD BE* fine. The following details what happens when PyThread_tss_free is called.
|
||||
// PYBIND11_TLS_FREE is PyThread_tss_free on python 3.7+. On older python, it does nothing.
|
||||
// PyThread_tss_free calls PyThread_tss_delete and PyMem_RawFree.
|
||||
// PyThread_tss_delete just calls TlsFree (on Windows) or pthread_key_delete (on *NIX). Neither
|
||||
|
@ -977,7 +977,7 @@ public:
|
||||
/** \rst
|
||||
Create a new top-level module that can be used as the main module of a C extension.
|
||||
|
||||
For Python 3, ``def`` should point to a staticly allocated module_def.
|
||||
For Python 3, ``def`` should point to a statically allocated module_def.
|
||||
For Python 2, ``def`` can be a nullptr and is completely ignored.
|
||||
\endrst */
|
||||
static module_ create_extension_module(const char *name, const char *doc, module_def *def) {
|
||||
@ -1005,7 +1005,7 @@ public:
|
||||
throw error_already_set();
|
||||
pybind11_fail("Internal error in module_::create_extension_module()");
|
||||
}
|
||||
// TODO: Sould be reinterpret_steal for Python 3, but Python also steals it again when returned from PyInit_...
|
||||
// TODO: Should be reinterpret_steal for Python 3, but Python also steals it again when returned from PyInit_...
|
||||
// For Python 2, reinterpret_borrow is correct.
|
||||
return reinterpret_borrow<module_>(m);
|
||||
}
|
||||
@ -2277,7 +2277,7 @@ PYBIND11_NAMESPACE_END(detail)
|
||||
/** \rst
|
||||
Try to retrieve a python method by the provided name from the instance pointed to by the this_ptr.
|
||||
|
||||
:this_ptr: The pointer to the object the overriden method should be retrieved for. This should be
|
||||
:this_ptr: The pointer to the object the overridden method should be retrieved for. This should be
|
||||
the first non-trampoline class encountered in the inheritance chain.
|
||||
:name: The name of the overridden Python method to retrieve.
|
||||
:return: The Python method by this name from the object or an empty function wrapper.
|
||||
|
Loading…
Reference in New Issue
Block a user