Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5a849148
Commit
5a849148
authored
Jul 21, 1996
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hacks for MS_COREDLL
parent
bb864062
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
Include/objimpl.h
Include/objimpl.h
+14
-0
No files found.
Include/objimpl.h
View file @
5a849148
...
...
@@ -47,12 +47,26 @@ 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.
*/
#ifndef MS_COREDLL
extern
PyObject
*
_PyObject_New
Py_PROTO
((
PyTypeObject
*
));
extern
varobject
*
_PyObject_NewVar
Py_PROTO
((
PyTypeObject
*
,
int
));
#define PyObject_NEW(type, typeobj) ((type *) _PyObject_New(typeobj))
#define PyObject_NEW_VAR(type, typeobj, n) ((type *) _PyObject_NewVar(typeobj, n))
#else
/* For an MS-Windows DLL, we change the way an object is created, so that the
extension module's malloc is used, rather than the core DLL malloc, as there is
no guarantee they will use the same heap
*/
extern
PyObject
*
_PyObject_New
Py_PROTO
((
PyTypeObject
*
,
PyObject
*
));
extern
varobject
*
_PyObject_NewVar
Py_PROTO
((
PyTypeObject
*
,
int
,
varobject
*
));
#define PyObject_NEW(type, typeobj) ((type *) _PyObject_New(typeobj,(PyObject *)malloc((typeobj)->tp_basicsize)))
#define PyObject_NEW_VAR(type, typeobj, n) ((type *) _PyObject_NewVar(typeobj, n, (varobject *)malloc((typeobj)->tp_basicsize + n * (typeobj)->tp_itemsize)))
#endif
/* MS_COREDLL */
#ifdef __cplusplus
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment