[Patches] [Patch #100853] merging my*.h into pyport.h
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 31 Jul 2000 09:38:03 -0700
Patch #100853 has been updated.
Project:
Category: core (C code)
Status: Accepted
Summary: merging my*.h into pyport.h
Follow-Ups:
Date: 2000-Jul-11 09:34
By: gvanrossum
Comment:
Python.h already includes pyport.h, so you can eliminate all those #import pyport.h from the .c files. (Not from *all* C files, because a few may not include Python.h, but the majority do.)
Also, please ask Jack Jansen to see if SYMANTEC_FFM68K and MC68K and other Mac symbols are still wanted.
Maybe much of the Mac-specific madness could be collected in a separate file included only #ifdef macintosh?
-------------------------------------------------------
Date: 2000-Jul-11 09:43
By: gvanrossum
Comment:
Also, you can delete the my*.h files (if indeed there are no references to them any more in the Python core source code).
-------------------------------------------------------
Date: 2000-Jul-11 15:45
By: nowonder
Comment:
Okay, I'll rework the patch. May take some time. Have to do some real work in between python sessions <wink>.
-------------------------------------------------------
Date: 2000-Jul-27 13:29
By: gvanrossum
Comment:
So, it's been a few weeks. Do you still want to do this?
-------------------------------------------------------
Date: 2000-Jul-28 02:00
By: nowonder
Comment:
Yes. I just wanted to wait until Thomas has dealt with that platform specific clutter.
It's on my list for next week. Maybe that means I'll do something about it ...
-------------------------------------------------------
Date: 2000-Jul-31 01:40
By: nowonder
Comment:
reworked the patch. please review it.
-------------------------------------------------------
Date: 2000-Jul-31 08:02
By: gvanrossum
Comment:
Works for me, and looks pretty innocent.
Check it in so we get some more feedback!
-------------------------------------------------------
Date: 2000-Jul-31 08:16
By: marangoz
Comment:
Feedback: I'm not thrilled by the fact that Python interfaces are defined
in pyport.h. Defining only the ANY & _Mem_EXTRA compatibility issues
is fine, but official PyMem_ interfaces is not so fine.
I'd prefer a separate .h file, be it mymalloc.h or pymalloc.h.
-------------------------------------------------------
Date: 2000-Jul-31 09:20
By: nowonder
Comment:
I like pymalloc.h.
Could you (Vladimir) or anybody else with some understanding of this piece of code seperate the compatibility stuff from the interfaces?
I could only guess.
-------------------------------------------------------
Date: 2000-Jul-31 09:23
By: marangoz
Comment:
Include/pymem.h is a better suggestion.
pymem.h should include everything starting from the comment
/* Core memory allocator */
and should include: "pyport.h" and "config.h"
where NEED_TO_DECLARE_MALLOC_AND_FRIENDS is defined.
So the current state is clearly unacceptable, because pyport.h
does not include config.h
Also, if someone wants to redefine the core malloc
(cf. the macros) it should be able to do it from configure.
If Guido doesn't object (and I just received his request for
comments from me), could you please revamp this and take
into account the above suggestions. Otherwise, I'll submit
another patch.
-------------------------------------------------------
Date: 2000-Jul-31 09:38
By: marangoz
Comment:
pyport.h needs to include config.h -- imperative.
Most defines used in pyport.h are in config.h.
Thus pymem.h/pymalloc.h would only include "pyport.h"
-------------------------------------------------------
-------------------------------------------------------
For more info, visit:
http://sourceforge.net/patch/?func=detailpatch&patch_id=100853&group_id=5470