Skip to content

Commit

Permalink
DOC: Make Py3K docs C code snippets RST literal blocks (numpygh-14263)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc authored and seberg committed Aug 13, 2019
1 parent cff0245 commit d8ce42b
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions doc/Py3K.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -812,20 +812,20 @@ Types with tp_as_sequence defined

PySequenceMethods in py3k are binary compatible with py2k, but some of the
slots have gone away. I suspect this means some functions need redefining so
the semantics of the slots needs to be checked.

PySequenceMethods foo_sequence_methods = {
(lenfunc)0, /* sq_length */
(binaryfunc)0, /* sq_concat */
(ssizeargfunc)0, /* sq_repeat */
(ssizeargfunc)0, /* sq_item */
(void *)0, /* nee sq_slice */
(ssizeobjargproc)0, /* sq_ass_item */
(void *)0, /* nee sq_ass_slice */
(objobjproc)0, /* sq_contains */
(binaryfunc)0, /* sq_inplace_concat */
(ssizeargfunc)0 /* sq_inplace_repeat */
};
the semantics of the slots needs to be checked::

PySequenceMethods foo_sequence_methods = {
(lenfunc)0, /* sq_length */
(binaryfunc)0, /* sq_concat */
(ssizeargfunc)0, /* sq_repeat */
(ssizeargfunc)0, /* sq_item */
(void *)0, /* nee sq_slice */
(ssizeobjargproc)0, /* sq_ass_item */
(void *)0, /* nee sq_ass_slice */
(objobjproc)0, /* sq_contains */
(binaryfunc)0, /* sq_inplace_concat */
(ssizeargfunc)0 /* sq_inplace_repeat */
};


PyMappingMethods
Expand All @@ -840,13 +840,13 @@ Types with tp_as_mapping defined
* multiarray/arrayobject.c

PyMappingMethods in py3k look to be the same as in py2k. The semantics
of the slots needs to be checked.
of the slots needs to be checked::

PyMappingMethods foo_mapping_methods = {
(lenfunc)0, /* mp_length */
(binaryfunc)0, /* mp_subscript */
(objobjargproc)0 /* mp_ass_subscript */
};
PyMappingMethods foo_mapping_methods = {
(lenfunc)0, /* mp_length */
(binaryfunc)0, /* mp_subscript */
(objobjargproc)0 /* mp_ass_subscript */
};


PyFile
Expand Down

0 comments on commit d8ce42b

Please sign in to comment.