summaryrefslogtreecommitdiffstats
path: root/Include/objimpl.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-12 11:45:45 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-12 11:45:45 (GMT)
commitcaa63808861d4e92d4dc1005fc01de0f2e4a8fd0 (patch)
tree3771531169ab510aca9b69cdc4d9de2b5c8810c4 /Include/objimpl.h
parent94390ec2a6ea5acbea9dead528ce067c396a0301 (diff)
downloadcpython-caa63808861d4e92d4dc1005fc01de0f2e4a8fd0.zip
cpython-caa63808861d4e92d4dc1005fc01de0f2e4a8fd0.tar.gz
cpython-caa63808861d4e92d4dc1005fc01de0f2e4a8fd0.tar.bz2
The great renaming, phase two: all header files have been updated to
use the new names exclusively, and the linker will see the new names. Files that import "Python.h" also only see the new names. Files that import "allobjects.h" will continue to be able to use the old names, due to the inclusion (in allobjects.h) of "rename2.h".
Diffstat (limited to 'Include/objimpl.h')
-rw-r--r--Include/objimpl.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Include/objimpl.h b/Include/objimpl.h
index a8ce3cb..cb27c7c 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -34,7 +34,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Additional macros for modules that implement new object types.
You must first include "object.h".
-NEWOBJ(type, typeobj) allocates memory for a new object of the given
+PyObject_NEW(type, typeobj) allocates memory for a new object of the given
type; here 'type' must be the C structure type used to represent the
object and 'typeobj' the address of the corresponding type object.
Reference count and type pointer are filled in; the rest of the bytes of
@@ -42,16 +42,16 @@ the object are *undefined*! The resulting expression type is 'type *'.
The size of the object is actually determined by the tp_basicsize field
of the type object.
-NEWVAROBJ(type, typeobj, n) is similar but allocates a variable-size
-object with n extra items. The size is computer as tp_basicsize plus
+PyObject_NEW_VAR(type, typeobj, n) is similar but allocates a variable-size
+object with n extra items. The size is computed as tp_basicsize plus
n * tp_itemsize. This fills in the ob_size field as well.
*/
-extern object *newobject PROTO((typeobject *));
-extern varobject *newvarobject PROTO((typeobject *, unsigned int));
+extern PyObject *_PyObject_New Py_PROTO((PyTypeObject *));
+extern varobject *_PyObject_NewVar Py_PROTO((PyTypeObject *, unsigned int));
-#define NEWOBJ(type, typeobj) ((type *) newobject(typeobj))
-#define NEWVAROBJ(type, typeobj, n) ((type *) newvarobject(typeobj, n))
+#define PyObject_NEW(type, typeobj) ((type *) _PyObject_New(typeobj))
+#define PyObject_NEW_VAR(type, typeobj, n) ((type *) _PyObject_NewVar(typeobj, n))
#ifdef __cplusplus
}