Commit Graph

61 Commits

Author SHA1 Message Date
Jeremy Hylton 938ace69a0 staticforward bites the dust.
The staticforward define was needed to support certain broken C
compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
static keyword when it was used with a forward declaration of a static
initialized structure.  Standard C allows the forward declaration with
static, and we've decided to stop catering to broken C compilers.  (In
fact, we expect that the compilers are all fixed eight years later.)

I'm leaving staticforward and statichere defined in object.h as
static.  This is only for backwards compatibility with C extensions
that might still use it.

XXX I haven't updated the documentation.
2002-07-17 16:30:39 +00:00
Jack Jansen 0e2f798301 Replaced lots of PyMem_DEL() calls with PyObject_DEL(). 2002-05-22 14:31:48 +00:00
Jack Jansen 786681ac60 Got rid of obsolete appearance flag. 2002-04-11 20:56:13 +00:00
Guido van Rossum 146483964e Patch supplied by Burton Radons for his own SF bug #487390: Modifying
type.__module__ behavior.

This adds the module name and a dot in front of the type name in every
type object initializer, except for built-in types (and those that
already had this).  Note that it touches lots of Mac modules -- I have
no way to test these but the changes look right.  Apologies if they're
not.  This also touches the weakref docs, which contains a sample type
object initializer.  It also touches the mmap test output, because the
mmap type's repr is included in that output.  It touches object.h to
put the correct description in a comment.
2001-12-08 18:02:58 +00:00
Jack Jansen 697842f58c Replaced PyMac_FullPath by PyMac_FullPathname, which has an extra 'length'
parameter for the return string (as unix pathnames are not limited
by the 255 char pstring limit).
Implemented the function for MachO-Python, where it returns unix pathnames.
2001-09-10 22:00:39 +00:00
Jack Jansen deefbe5666 - Don't return mac-style pathnames in unix-Python.
- Fixed up a lot more prototypes (gcc also wants them on static routines)
- Fixed various other gcc warnings.
2001-08-08 13:46:49 +00:00
Jack Jansen f3163303a9 Ifdeffed a few more sections. All functionality that is relevant on MacOSX
now appears to work.
2001-05-19 12:50:05 +00:00
Jack Jansen 6143d533b6 Include Carbon/Carbon.h in stead of universal headers, if appropriate.
Test for TARGET_API_MAC_OS8 in stead of !TARGET_API_MAC_CARBON where
appropriate.
2001-05-19 12:34:59 +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 193509b320 Added an attribute runtimemodel, which is either "ppc" or "carbon" and is the runtime model of the current interpreter. Will have to ad another value later for real MacOSX MachO, I guess. 2001-01-23 22:38:23 +00:00
Jack Jansen 8413b47ba7 Added PyMac_OutputSeen(), which acknowledges all current output in the stdio window, i.e. it acts like input has been read insofar as the keep-console-open option is interested. 2000-10-19 22:02:16 +00:00
Jack Jansen b19c667d94 Added a method KeepConsole so programs can override the Keep console open option. 2000-10-12 21:24:05 +00:00
Jack Jansen fa1e27d8d2 Got rid of Py_FatalError calls. 2000-09-08 10:21:44 +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 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 957d07a159 Added FreeMem, MaxBlock and CompactMem calls. The values returned by these are lower bounds in the Python case (as malloc doesn't return memory to the heap) but they can be used to decide when to give low-memory warnings. 2000-02-21 11:07:37 +00:00
Jack Jansen 8f5725af60 First bits and pieces of appearance support: an init routine, a global flag PyMac_AppearanceCompliant (exported thru MacOS). If USE_APPEARANCE
is off the code is disabled (but the variables are still there, set to 0).
1999-12-07 23:08:10 +00:00
Jack Jansen deff89c8be Replaced fprintf(stderr,...) with PySys_WriteStderr(...) where appropriate. 1998-10-12 20:53:15 +00:00
Jack Jansen d674163a0b The init routine for MacOS had a non-standard name. Changed to
initMacOS().
1998-07-01 15:48:54 +00:00
Jack Jansen cbe6a53d1f Fixed double-dispose of splash() dialog 1998-02-20 15:59:59 +00:00
Jack Jansen a755e68df6 Export type objects to Python 1997-09-20 17:40:22 +00:00
Jack Jansen 2e871e4f09 Added SysBeep 1997-09-08 13:23:19 +00:00
Jack Jansen 898ac1bb46 Added GetTicks() here, so profiling can use a decent timer 1997-09-01 15:38:12 +00:00
Jack Jansen 883765eb71 added SetEventHandler 1997-06-20 16:19:38 +00:00
Jack Jansen 120a105823 Removed SetScheduleTimes
Added SchedParams
Added docstrings for most routines
1997-06-03 15:29:41 +00:00
Jack Jansen 450ae9f352 Don't free the MacOS_Splash() dialog twice... 1997-05-13 15:41:48 +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 f73bab7f96 Added an attribute string_id_to_buffer, which gives the offset you
have to add to the id() of a string to get the address of the
data. This is a horrible and error-prone hack, but unfortunately it is
one that is needed for playing audio and crearing pixmaps. Having the
constant here is at least marginally better than the previous practice
of having the constant 16 all over the place...
1997-04-03 14:51:03 +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 42218ce33c Added/updated copyright notices
(and the &*^$%@ resource files got binhexed again, sigh)
1997-01-31 16:15:11 +00:00
Jack Jansen 84fb1fab1f Got rid of nfullpath() 1996-11-09 18:46:57 +00:00
Jack Jansen a1255e0c4e removed unused var 1996-10-23 15:44:27 +00:00
Jack Jansen eb76b8484d Added DebugStr method to drop into low-level debugger 1996-09-30 14:43:22 +00:00
Jack Jansen 04df9d5ad4 Added dialog-centering code to splash() 1996-09-23 15:49:43 +00:00
Jack Jansen df34cf1206 Fixed macos.splash to actually *draw* the splash box:-) 1996-09-15 22:12:00 +00:00
Jack Jansen ab7fcdd770 Added splash method (to quickly display splash screen without first
having to load a zillion extension modules)
1996-05-20 11:32:00 +00:00
Jack Jansen 6648fb749b Removed unused vars 1996-03-05 16:56:00 +00:00
Jack Jansen 76a0589986 Added openrf method, which opens resource fork. The resulting object
supports a subset of normal file functionality.
1996-02-29 16:11:32 +00:00
Jack Jansen 829f88c169 Added GetErrorString method (convert OSErr number to string) 1995-07-17 11:36:01 +00:00
Guido van Rossum e7134aa0f2 return old value of PyMac_DoYieldEnabled; -1 means do not even check for interrupts 1995-02-26 10:20:53 +00:00
Guido van Rossum e6d9ccc33a change SC ifdef to MPW 1995-02-21 21:01:05 +00:00
Jack Jansen b2f6a7ec00 Minor bug fix 1995-02-20 15:46:10 +00:00
Guido van Rossum 9fed183f22 cfm 68k support 1995-02-18 15:02:02 +00:00
Jack Jansen a76382a6ac Added HandleEvent method to macos, so python programs can hand back
events they don't want to handle to stdio
1995-02-02 14:25:56 +00:00
Jack Jansen ee23d6ec87 - Moved interrupt code to macglue.c
- Added possibility to turn off mainloop event handling
- Check interrupts even when not handling events
- Be more carefulabout which events we want
- Use different method to determine fg/bg
1995-01-27 14:43:25 +00:00
Jack Jansen e8e8ae0f2c Added eventhandling in mainloop/busywait routine plus leaving some
cycles for background apps. MacOS has a new method to set the amount
of time for bg apps.
1995-01-26 16:36:45 +00:00
Guido van Rossum bf068b1505 Got rid of the Resource and Sound interfaces, in favor of the ones
generated from the header files (with some hand-holding :-).
1995-01-25 23:09:20 +00:00
Guido van Rossum 5679e56bd1 ported CW5 changes back to Think 1995-01-22 19:04:11 +00:00
Guido van Rossum b7e79e5f94 Got rid of {Get,Set}FileType in favor of {Get,Set}CreatorAndType --
the former had their arguments reversed compared to all Apple's
routines (e.g. FSpOpenResFile()).

Also fixed the SoundMgr UserRoutine (Jack fixed it but put the fix
between #ifdef __MWERKS__ ... #endif :-( ).

NB eventually this module should disappear in favor of separate
modules per manager (e.g. Resources, Sound, Files, ...).
1995-01-22 18:42:12 +00:00