Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
40931961
Unverified
Commit
40931961
authored
Jan 13, 2021
by
Andy Maloney
Committed by
GitHub
Jan 13, 2021
Browse files
docs: fix spelling in some comments/docs (#2777)
Found with codespell
parent
df8494dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
include/pybind11/detail/internals.h
include/pybind11/detail/internals.h
+1
-1
include/pybind11/pybind11.h
include/pybind11/pybind11.h
+3
-3
No files found.
include/pybind11/detail/internals.h
View file @
40931961
...
@@ -112,7 +112,7 @@ struct internals {
...
@@ -112,7 +112,7 @@ struct internals {
PyInterpreterState
*
istate
=
nullptr
;
PyInterpreterState
*
istate
=
nullptr
;
~
internals
()
{
~
internals
()
{
// This destructor is called *after* Py_Finalize() in finalize_interpreter().
// 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 whe
n
PyThread_tss_free is called.
// PYBIND11_TLS_FREE is PyThread_tss_free on python 3.7+. On older python, it does nothing.
// 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_free calls PyThread_tss_delete and PyMem_RawFree.
// PyThread_tss_delete just calls TlsFree (on Windows) or pthread_key_delete (on *NIX). Neither
// PyThread_tss_delete just calls TlsFree (on Windows) or pthread_key_delete (on *NIX). Neither
...
...
include/pybind11/pybind11.h
View file @
40931961
...
@@ -977,7 +977,7 @@ public:
...
@@ -977,7 +977,7 @@ public:
/** \rst
/** \rst
Create a new top-level module that can be used as the main module of a C extension.
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 static
al
ly allocated module_def.
For Python 2, ``def`` can be a nullptr and is completely ignored.
For Python 2, ``def`` can be a nullptr and is completely ignored.
\endrst */
\endrst */
static
module_
create_extension_module
(
const
char
*
name
,
const
char
*
doc
,
module_def
*
def
)
{
static
module_
create_extension_module
(
const
char
*
name
,
const
char
*
doc
,
module_def
*
def
)
{
...
@@ -1005,7 +1005,7 @@ public:
...
@@ -1005,7 +1005,7 @@ public:
throw
error_already_set
();
throw
error_already_set
();
pybind11_fail
(
"Internal error in module_::create_extension_module()"
);
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: S
h
ould be reinterpret_steal for Python 3, but Python also steals it again when returned from PyInit_...
// For Python 2, reinterpret_borrow is correct.
// For Python 2, reinterpret_borrow is correct.
return
reinterpret_borrow
<
module_
>
(
m
);
return
reinterpret_borrow
<
module_
>
(
m
);
}
}
...
@@ -2277,7 +2277,7 @@ PYBIND11_NAMESPACE_END(detail)
...
@@ -2277,7 +2277,7 @@ PYBIND11_NAMESPACE_END(detail)
/** \rst
/** \rst
Try to retrieve a python method by the provided name from the instance pointed to by the this_ptr.
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 overrid
d
en method should be retrieved for. This should be
the first non-trampoline class encountered in the inheritance chain.
the first non-trampoline class encountered in the inheritance chain.
:name: The name of the overridden Python method to retrieve.
: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.
:return: The Python method by this name from the object or an empty function wrapper.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment