Commit Graph

47 Commits

Author SHA1 Message Date
Jack Jansen e54968a11a Some escaped newlines had spaces between the backslash and the newline. Also slightly changed the comment on xstat(). 2001-10-23 22:28:23 +00:00
Guido van Rossum 98bf58f1c6 SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
This is a big one, touching lots of files.  Some of the platforms
aren't tested yet.  Briefly, this changes the return value of the
os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the
time functions localtime(), gmtime(), and strptime() from tuples into
pseudo-sequences.  When accessed as a sequence, they behave exactly as
before.  But they also have attributes like st_mtime or tm_year.  The
stat return value, moreover, has a few platform-specific attributes
that are not available through the sequence interface (because
everybody expects the sequence to have a fixed length, these couldn't
be added there).  If your platform's struct stat doesn't define
st_blksize, st_blocks or st_rdev, they won't be accessible from Python
either.

(Still missing is a documentation update.)
2001-10-18 20:34:25 +00:00
Jack Jansen d7b568ac4d test_glob found a nasty bug in GUSI opendir(): it will not fail when called on files, but in stead open the parent directory! We now explicitly test for the argument being a directory and simulate ENOTDIR otherwise. 2001-08-11 23:18:55 +00:00
Jack Jansen ddafd2b0c7 (Finally) converted to new-style args.
Added an optional (and ignored) 3d parameter to open() to make the signature compatible with posixmodule.
Added the various O_ constants (by stealing the code from posixmodule).

test_fileinput now passes.
2001-08-03 13:07:19 +00:00
Jack Jansen 6e68a7e74f Be more sensible about when to use TARGET_API_MAC_OS8 in stead of !TARGET_API_MAC_CARBON. This should greatly facilitate porting stuff to OSX in its MachO/BSD incarnation. 2001-05-12 21:31:34 +00:00
Jack Jansen d9d0b5fab1 xstat() will never be implemented under Carbon. Fortunately it also doesn't appear to be used anywhere. 2001-01-12 23:37:14 +00:00
Jack Jansen 8748a0b654 Added a prototype for mstats(). 2000-08-25 22:18:20 +00:00
Jack Jansen 74a1e63a89 Test for TARGET_API_MAC_CARBON with #if in stead of #ifdef. 2000-07-14 22:37:27 +00:00
Jack Jansen e17fd2a5af Got rid of __SC__ ifdefs. 2000-07-11 22:37:03 +00:00
Jack Jansen d88296d25a ANSIfication step 1: get rid of Py_PROTO and Py_FPROTO. 2000-07-11 19:51:05 +00:00
Jack Jansen d4d24cd96b Removed USE_STDWIN support. 2000-06-04 22:02:02 +00:00
Jack Jansen e79dc76f53 Made the core toolbox modules carbon-compatible using the new greylist feature of bgen: non-carbon methods are still included in non-carbon MacPython. The issue of backward compatibility of Python code is still open.
Macmodule and macosmodule have also been carbonified. Some functionality is still missing there.
2000-06-02 21:35:07 +00:00
Jack Jansen 12e89e42d8 Fixed to work again without USE_GUSI 2000-05-12 21:36:29 +00:00
Jack Jansen 37d21e117f Started on GUSI2 and threading support. 2000-04-07 09:25:06 +00:00
Jack Jansen 40bd770690 Add fstat() if using GUSI 1998-02-20 15:56:19 +00:00
Jack Jansen 55e3927f58 New exception interface 1997-10-07 21:47:25 +00:00
Jack Jansen eeccca9bdc - Changed the m# format for PyArg_ParseTuple back to s#
- c2pstr has moved to a different include file
1997-05-07 15:46:31 +00:00
Jack Jansen 4a8c54e6d9 - Changed GestaltEqu.h to Gestalt.h
- Changed FragLoader.h to CodeFragments.h
- Removed Desk.h
- Regenerated bgen modules from new universal headers
- Changed some of the s# in PyArg_ParseTuple to m# (unfortunately:
  this should have been a different commit)
1997-02-24 13:56:59 +00:00
Jack Jansen 4f27a55e80 Comments around identifier after #endif 1997-02-20 15:22:17 +00:00
Jack Jansen 42218ce33c Added/updated copyright notices
(and the &*^$%@ resource files got binhexed again, sigh)
1997-01-31 16:15:11 +00:00
Jack Jansen f5c20575cb Renamed 1997-01-30 15:48:07 +00:00
Jack Jansen 46ed276bc3 Malloc debugging now flagged with USE_MALLOC_DEBUG 1996-10-23 15:46:57 +00:00
Jack Jansen 59b912adf5 Fixed xstat to again include resroucefork size, creator, type. Obtain
thru macstat(), but other values via stat() (so os.stat() and
os.xstat() agree).
1996-10-15 16:13:33 +00:00
Jack Jansen 3ca6eddb12 GUSI mkdir() lost its dummy second arg 1996-08-06 16:06:31 +00:00
Jack Jansen 378815ca86 Replaced previous gusi-chdir() fix by a call to PyMac_FixGUSIcd()
after each chdir call.
1996-03-06 16:21:34 +00:00
Jack Jansen 243b29b169 Mods by Guido: mkdir 2nd arg optional and remove as alias for unlink. 1996-02-21 12:33:50 +00:00
Jack Jansen b697173b5f - Added Guido's fixes
- Removed CW4 ifdefs
- Rationalized ifdefs for dup, fdopen
1996-02-20 16:24:37 +00:00
Jack Jansen c743c8d166 Modified for GUSI 1996-02-14 16:02:30 +00:00
Guido van Rossum 222c8924c1 add xstat (extended stat, returns resource fork size and creator/type) 1995-08-08 14:10:22 +00:00
Jack Jansen a0e76bebd3 Ported to CodeWarrior 6 1995-06-09 20:39:24 +00:00
Guido van Rossum d1ef5962d2 explicitly init flags in methodlist 1995-02-19 15:50:35 +00:00
Guido van Rossum 8318f2fb8f add __SC__ ifdef 1995-02-17 14:23:51 +00:00
Guido van Rossum 5693412892 malloc debug only on ppc 1995-02-13 16:19:04 +00:00
Jack Jansen 9eeb82dde1 CodeWarrior 5 has more unixisms (open/close/read/write) 1995-01-26 16:34:53 +00:00
Jack Jansen 7cbf4803a9 Make malloc stats routine available under MetroWerks 1995-01-22 16:52:38 +00:00
Jack Jansen d50e4e1c54 More Pstring() stuff and some cosmetics 1995-01-18 13:58:04 +00:00
Guido van Rossum 99546997f6 1995 copyright 1995-01-08 14:33:34 +00:00
Jack Jansen 0c097eab57 Ported to MetroWerks, which misses file-descriptor like functionality. 1994-12-14 13:48:38 +00:00
Guido van Rossum 739267b7c3 Completed (hopefully) the unification of THINK 6.0 and MPW 3.2
versions -- they now share config.c and config.h, and statting is
always done through macstat.[ch] (THINK's <stat.h> defines funny
constants).  Also the configuration of stdwin is done differently: you
have to define USE_STDWIN to the compiler prefix.
1994-08-29 08:42:37 +00:00
Guido van Rossum e783444440 Intermediate version of changes after porting to MPW 3.2 1994-08-26 09:09:48 +00:00
Guido van Rossum 29e7af07f0 Some more changes 1994-08-23 13:28:34 +00:00
Guido van Rossum d4d7728440 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here. 1994-08-19 10:51:31 +00:00
Guido van Rossum 170c2e108f Change include path for unixemu headers; rename access to access_ 1994-06-27 15:24:53 +00:00
Guido van Rossum 921a08f303 Walker's changes fixed so they work in THINK C 5 1994-05-06 15:56:22 +00:00
Guido van Rossum 87f223c6c7 As extended by Richard M Walker for MPW 1994-05-06 15:54:15 +00:00
Guido van Rossum a1238eb734 Fix copyright -- 1994 instead of 1004! 1994-01-18 10:09:50 +00:00
Guido van Rossum ce9739ba76 Initial revision 1994-01-05 16:17:15 +00:00