This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Kill off docs for unsafe macros
Type: Stage:
Components: Documentation Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: fdrake Nosy List: akuchling, david_abrahams, fdrake, loewis
Priority: normal Keywords: patch

Created on 2003-03-13 13:10 by david_abrahams, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
macro.patch david_abrahams, 2003-03-13 13:11
Messages (5)
msg43022 - (view) Author: David Abrahams (david_abrahams) Date: 2003-03-13 13:10
I'll also attach the patch, but a message body is 
required:
=========================================
==========================
RCS 
file: /cvsroot/python/python/dist/src/Doc/api/memory.tex,
v
retrieving revision 1.2
diff -w -u -r1.2 memory.tex
--- memory.tex	6 Apr 2002 09:14:33 -0000
	1.2
+++ memory.tex	13 Mar 2003 12:56:26 -0000
@@ -195,9 +195,7 @@
 In addition to the functions aimed at handling raw 
memory blocks from
 the Python heap, objects in Python are allocated and 
released with
 \cfunction{PyObject_New()}, \cfunction
{PyObject_NewVar()} and
-\cfunction{PyObject_Del()}, or with their corresponding 
macros
-\cfunction{PyObject_NEW()}, \cfunction
{PyObject_NEW_VAR()} and
-\cfunction{PyObject_DEL()}.
+\cfunction{PyObject_Del()}.
 
 These will be explained in the next chapter on defining 
and
 implementing new object types in C.
Index: newtypes.tex
=========================================
==========================
RCS 
file: /cvsroot/python/python/dist/src/Doc/api/newtypes.te
x,v
retrieving revision 1.21
diff -w -u -r1.21 newtypes.tex
--- newtypes.tex	10 Feb 2003 19:18:21 -0000
	1.21
+++ newtypes.tex	13 Mar 2003 12:56:27 -0000
@@ -62,23 +62,6 @@
   after this call as the memory is no longer a valid 
Python object.
 \end{cfuncdesc}
 
-\begin{cfuncdesc}{\var{TYPE}*}{PyObject_NEW}{TYPE, 
PyTypeObject *type}
-  Macro version of \cfunction{PyObject_New()}, to gain 
performance at
-  the expense of safety.  This does not check \var{type} 
for a \NULL{}
-  value.
-\end{cfuncdesc}
-
-\begin{cfuncdesc}{\var{TYPE}*}{PyObject_NEW_VAR}
{TYPE, PyTypeObject *type,
-                                                int size}
-  Macro version of \cfunction{PyObject_NewVar()}, to 
gain performance
-  at the expense of safety.  This does not check \var
{type} for a
-  \NULL{} value.
-\end{cfuncdesc}
-
-\begin{cfuncdesc}{void}{PyObject_DEL}{PyObject *op}
-  Macro version of \cfunction{PyObject_Del()}.
-\end{cfuncdesc}
-
 \begin{cfuncdesc}{PyObject*}{Py_InitModule}{char 
*name,
                                             PyMethodDef *methods}
   Create a new module object based on a name and 
table of functions,
msg43023 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2003-07-04 01:00
Logged In: YES 
user_id=3066

I'm not sure what you're suggesting with this patch.  Could
you explain the intention?
msg43024 - (view) Author: David Abrahams (david_abrahams) Date: 2003-07-04 02:37
Logged In: YES 
user_id=52572

I've forgotten, frankly.  You might check python-dev around 
this date.  Seems like Guido may have agreed that these 
macros were really not meant to be touched by users and 
shouild be deprecated, but I don't recall.
msg43025 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2004-08-07 20:31
Logged In: YES 
user_id=11375

Tim made the suggestion that only the core should use them: 
http://mail.python.org/pipermail/python-dev/2003-March/033993.html

Thomas Heller disagreed.  How should we rule on this?
msg43026 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-14 15:59
Logged In: YES 
user_id=21627

I agree that these macros should not be used. Given that the
patch wasn't rejected for quite some time now, it appears
nobody feels strongly that the macros should stay
documented. Committed as 45395.
History
Date User Action Args
2022-04-10 16:07:38adminsetgithub: 38158
2003-03-13 13:10:31david_abrahamscreate