Commit Graph

34 Commits

Author SHA1 Message Date
Tim Peters 182b5aca27 Whitespace normalization, via reindent.py. 2004-07-18 06:16:08 +00:00
Jack Jansen a53f4eba19 Getting rid of code conditional on TARGET_API_MAC_*. 2003-11-19 16:34:04 +00:00
Jack Jansen 9588770e25 PyDoc_STR is always defined nowadays (and has been for quite some time:-) 2003-11-19 16:18:02 +00:00
Jack Jansen e48cef7aba Getting rid of WITHOUT_FRAMEWORKS and ACCESSOR_CALLS_ARE_FUNCTIONS:
MacOS9isms.
2003-11-19 16:13:35 +00:00
Jack Jansen b2a57722a8 It turns out that some calls return AEDesc records that are "borrowed",
the AEDesc data shouldn't be disposed when the Python object is.

Added a C call AEDesc_NewBorrowed() to create these objects and a Python
method old=AEDesc.AutoDispose(onoff) to change auto-dispose state.
2003-01-17 23:11:17 +00:00
Jack Jansen 65cbf93fce Get rid of support for Universal Headers older than 3.4 and various other
outdated things.
2002-12-13 15:02:02 +00:00
Jack Jansen 96cebde909 Added PEP253 support to most Carbon modules. This isn't complete yet:
some of the more compilcated cases (CF, Res) haven't been done yet. Also,
various types should inherit from each other (anything with an as_Resource
method should be a Resource subtype, the CF types should become one family).
2002-12-03 23:40:22 +00:00
Jack Jansen dbd5701d73 Converted the Carbon modules to use PEP252-style objects, with
descriptors in stead of manual getattr hooks to get at attributes
of the objects.

For Qd I have in stead gotten rid of most of the attribute access
in favor of the carbon-style accessor methods (with the exception
of visRgn, to be done later), and of the Carbon.Qd.qd global object,
for which accessor functions are also available.

For List I have fixed the fact that various methods were incorrectly
generated as functions.

CF is untouched: PEP252 doesn't allow "poor-mans-inheritance" with
basechain, so it will have to wait for PEP253 support.
2002-11-29 23:40:48 +00:00
Jack Jansen 714d7268d5 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
2002-03-25 00:32:17 +00:00
Just van Rossum 3e584aaa2a Ugh, by all means, _do_ report exceptions somehow ;-) 2002-01-04 13:49:36 +00:00
Jack Jansen 62d24a0f50 Don't call PyMac_HandleEvent if we're in unix-Python. 2001-09-01 23:38:50 +00:00
Jack Jansen 77105a960b The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package. 2001-08-23 13:51:46 +00:00
Jack Jansen 2942131dac Got rid of a silly #if. 2001-06-20 21:44:38 +00:00
Jack Jansen ff75c214ef Adapted to Universal Headers 3.4: new refcontype and use UPP names in stead of Proc names for callback creation. 2001-06-20 20:53:38 +00:00
Jack Jansen fa77e1a1b1 Lots more Carbon/Carbon.h includes, new UPP routine names, function prototypes. Most toolbox modules now compile, link and import in MacOSX-MachO python. 2001-05-22 21:56:42 +00:00
Jack Jansen 0e04eecdbf First step in porting MacPython modules to OSX/unix: break all references between modules except for the obj_New() and obj_Convert() routines, the PyArg_Parse and Py_BuildValue helpers.
And these can now be vectored through glue routines (by defining USE_TOOLBOX_OBJECT_GLUE) which will do the necessary imports, whereupon the module's init routine will tell the glue routine about the real conversion routine address and everything is fine again.
2001-05-17 21:58:34 +00:00
Jack Jansen 8ed81303f6 Use new multi-input-file feature of bgen in stead of @-file hack to parse multiple header files. A side effect is that the ObjectSupportLib routines are now also available in Python. 2000-12-12 22:09:11 +00:00
Jack Jansen f7d5aa61d3 Adapted to Universal Headers 3.3.2. More to follow. 2000-12-10 23:43:49 +00:00
Jack Jansen a44923fbfe Got rid of obsolete HAVE_UNIVERSAL_HEADERS test and SystemSevenOrLater define. 2000-07-14 22:52:50 +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 9d8b96c850 pymactoolbox.h contains protoypes for all externally visible toolbox module
functions. Include it in stead of duplicating the declarations everywhere. Also
cleaned up toolbox module exports, and got rid of resNotFound error.
2000-07-14 22:16:45 +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 def77e5346 AETransactionID was mistakenly defined as a short (it is a long). Fixed. 2000-03-14 23:29:08 +00:00
Jack Jansen deff89c8be Replaced fprintf(stderr,...) with PySys_WriteStderr(...) where appropriate. 1998-10-12 20:53:15 +00:00
Jack Jansen 0c4d947eac Replaced addpack by handcrafted code to find the bgen stuff. 1998-04-17 14:07:56 +00:00
Jack Jansen 21f96872f2 Regenerated from Universal Headers 3.0.1. Some new calls are
blacklisted, because they are not available in classic 68k programs,
and bgen doesn't have a way to put #ifdef/#endif in the generated
code. For now we only implement calls that work on all three models.
1998-02-20 16:02:09 +00:00
Jack Jansen f69633e4a1 Made AEDesc_{New,Convert} global 1997-08-15 14:31:13 +00:00
Jack Jansen 3757523f1e Adapted to new event handling. It is now also possible to abort out of
an AESend with command-. (unless specifically disabled, of course).
1997-06-20 16:19:14 +00:00
Jack Jansen c7cfb95559 Rather massive changes:
- Make the stuff run on Jack's machine (and hopefully all machines) in
  stead of Guido's only (addpack stuff)
- Use the Universal Headers in stead of the Think headers
- Fixed the test programs to use the new routine names
1995-06-05 22:34:12 +00:00
Guido van Rossum e375b3f1e5 use PyMac_Yield() instead of PyMac_Idle() 1995-03-23 10:41:41 +00:00
Guido van Rossum 9784295b15 another round... ported to __SC__ 1995-02-19 15:59:49 +00:00
Guido van Rossum 3075b326c4 different #ifdefs 1995-02-14 09:48:02 +00:00
Guido van Rossum b19a645b69 more think/mw changes 1995-02-05 16:58:33 +00:00
Guido van Rossum 17448e2408 Committed a more or less working version. 1995-01-30 11:53:55 +00:00