Skip to content

Commit 164c842

Browse files
committed
Formatting code blocks
1 parent 17cf256 commit 164c842

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

advanced_source/cpp_custom_ops.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,16 @@ three ways:
284284

285285
1. The first way to load the C++ library that holds the custom operator definition
286286
is to define a dummy Python module for _C. Then, in Python, when you import the
287-
module with ``import _C``, the ``.so``s corresponding to the extension will be
288-
loaded and the ``TORCH_LIBRARY`` and ``TORCH_LIBRARY_IMPL`` static initializers
287+
module with ``import _C``, the ``.so`` files corresponding to the extension will
288+
be loaded and the ``TORCH_LIBRARY`` and ``TORCH_LIBRARY_IMPL`` static initializers
289289
will run. One can create a dummy Python module with ``PYBIND11_MODULE`` like below,
290290
but you will notice that this does not compile with ``Py_LIMITED_API``, because
291291
``pybind11`` does not promise to only use the stable limited CPython API! With
292292
the below code, you sadly cannot build a CPython agnostic wheel for your extension!
293-
(Foreshadowing: I wonder what the second way is ;)).
293+
(Foreshadowing: I wonder what the second way is ;) ).
294294

295295
.. code-block:: cpp
296+
296297
// in, say, not_agnostic/csrc/extension_BAD.cpp
297298
#include <pybind11/pybind11.h>
298299
@@ -312,6 +313,7 @@ three ways:
312313
for more details:
313314

314315
.. code-block:: cpp
316+
315317
#include <Python.h>
316318
317319
extern "C" {

0 commit comments

Comments
 (0)