summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-07-21 02:30:39 (GMT)
committerGuido van Rossum <guido@python.org>1996-07-21 02:30:39 (GMT)
commitf5030abca88f96508d9a87000e2d16c0a92a3502 (patch)
tree57e9b309e24c363f6f797c4c24dff055217b0563 /Objects/object.c
parent3cb486879a8ca504a61b747fae389bbc01756388 (diff)
downloadcpython-f5030abca88f96508d9a87000e2d16c0a92a3502.zip
cpython-f5030abca88f96508d9a87000e2d16c0a92a3502.tar.gz
cpython-f5030abca88f96508d9a87000e2d16c0a92a3502.tar.bz2
Hacks for MS_COREDLL
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 7994389..be40c40 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -100,11 +100,20 @@ inc_count(tp)
}
#endif
+#ifndef MS_COREDLL
object *
newobject(tp)
typeobject *tp;
+#else
+object *
+newobject(tp,op)
+ typeobject *tp;
+ PyObject *op;
+#endif
{
+#ifndef MS_COREDLL
object *op = (object *) malloc(tp->tp_basicsize);
+#endif
if (op == NULL)
return err_nomem();
op->ob_type = tp;
@@ -112,13 +121,23 @@ newobject(tp)
return op;
}
+#ifndef MS_COREDLL
varobject *
newvarobject(tp, size)
typeobject *tp;
int size;
+#else
+varobject *
+newvarobject(tp, size, op)
+ typeobject *tp;
+ int size;
+ varobject *op;
+#endif
{
+#ifndef MS_COREDLL
varobject *op = (varobject *)
malloc(tp->tp_basicsize + size * tp->tp_itemsize);
+#endif
if (op == NULL)
return (varobject *)err_nomem();
op->ob_type = tp;