Source

pyobjc / pyobjc / Modules / objc / objc-object.m

Author Commit Message Labels Comments Date
Ronald Oussoren
- Check output from Scripts/find-raw-pointers.py, and fix issues - Rename objc.Accessor to objc.accessor. objc.Accessor still exists, to but generates a warning. - Move all extension modules to toplevel for consistency, and remove leftover extension modules from older releases when installing. - Add a note about Cocoa Bindings to the documentation. - Sync MPCompat with current Python version - Some Python2.2/Jaguar related fixes - Fix struct-wrapper (t…
Tags
pyobjc-1.1b1
Ronald Oussoren
This fixes the symptoms(sp?) of a bug, not sure if this is the correct fix... The bug: I sometimes get 'SystemError: error return without exception set' when I have a typo in the name of an initialiser method. This never happens on the toplevel, but in a callback. The bug is always triggered by code like this: foo = SomeClass.alloc().inti() # Oops can't spell init The "fix" saves the exception information before actually deallocating the uninitialized Objective-C object …
Ronald Oussoren
- Give a more usefull error message when a method implementation runs of the end of the function - Recreate HTML files - Create seperate directories for the 10.2 and 10.3 installer - Version is now 1.1a0 - Add wrapper for SecurityInterface (Panther) This is not very usefull, but it is an Apple defined Objective-C framework. - Make CodeGen scripts smart enough to detect enums in SecurityInterface
Ronald Oussoren
- Scripts/gen_test_methods.py now creates testbndl2.m and test_methods2.py with some conditional code to make sure we can perform all tests on MacOS X, while not causing problems on GNUstep (which doesn't have a 'bool' type at the moment). - Add 'MAC_OS_X_VERSION*' values to the objc module, allows easier version checking in Python (probably only usefull in the unittests). - Remove ObjCErr_Set, which was basically a reimplementation of PyErr_Format - Remove Scrip…
Ronald Oussoren
- Move creation of CIFs and closures to seperate functions (libffi_support.m) - Use those functions to remove the need for find_real_superclass in class-builder.m - Make sure users cannot delete selectors from classes, we cannot remove them from the Objective-C runtime either. - the IMPs for python-based methods in class-builder.m should contain a hard binding to the python callable (needed for Key-Value Observing). - Update the wrappers for Foundation and AppKit to u…
Ronald Oussoren
- Class methods are no longer callable through instances - Use PyObjC_PythonToCArray for more method implementations in Foundation - Slightly smarter code generators - Fix for bug 854294, by restructering some code we can make sure that ObjC classes are fully initialized before we use them. Before this checkin some classes were not fully initialized during subclassing :-(
Ronald Oussoren
- Add support for KeyValueCoding observations (MacOS X 10.3). That is, observeValueForKeyPath:ofObject:change:context: will now be called for "pure python" keys. - Add unittests for the first item - Don't convert NSDecimalNumber to a Python float, we loose information that way. Todo: special methods (__add__ and the like) for this class.
Ronald Oussoren
2 major changes: - Support for GNUstep - Support for PEP311 Also: - Add wrappers for SecurityInterface framework - Add simple unittests for all frameworks, to be sure that the wrappers can be used. - Add wrappers for newly introduced difficult methods (and some old) - Add annotation to method signatures (in, out, inout) where applicable. - Add partial support for PEP311: it is now always save to call from Objective-C into Python using easy methods (e.g…
Ronald Oussoren
- Work better with type 'bool' (Objective-C) - Other workaround for bug #77308 PyTuple_Type is not 'Ready' when entering init_objc, that's normal. It is also not ready during calls to _convenience.py while __dict__ is set. That is not normal and causes a crash. Calling PyType_Ready on the tuple type makes sure the type is ready, which means we no longer get a crash.
Ronald Oussoren
Multiple-inheritance didn't work if the base-class is an old-style class. (bug #785980) The original poster seems to have been lucky, I got segmentation faults on the new testcase.
Ronald Oussoren
- Fix signature for a method in NSSavePanel - Add testcase for this - Noticed, but didn't fix, that we increase a reference count without releasing it in objc-class.m. Should be fixed later, this could cause problems with long-living applications.
Ronald Oussoren
- Disable the free-list for PyObjCObjects, the code is causing crashes with Python 2.2 and isn't enough of a win to bother with fixing it right now. - don't forget to update the version number and release date during a release. - PyObjCTools.KeyValueCodingSupport is already gone, also remove its testcases. - Don't create a full proxy object for self during the call to __del__ of proxied ObjC objects.
Ronald Oussoren
- Add some tests for the custom wrappers of methods in the Foundation frameworks. This is work in progress, more tests are needed (see next item for an example of why tests are usefull). - Fix the bugs found by these tests, including a cut&paste bug that affects lots of calls to PyArg_ParseTuple. Previous version would crash if you use the API incorrectly (wrong number of arguments, wrong values). - Add a Cocoa-Python-ObjC Document-based Application template…
Ronald Oussoren
- Methods with output parameters and a 'void' return type are wrapped slightly differently from normal methods with output parameters: 1) The 'original' return value is no longer part of the tuple, this is a more natural translation to Python 2) If there is only 1 output parameter the method returns the value of that parameter instead of a tuple containing that value. TODO: update documentation - Also update the Todo example to deal with this change - Also …
Ronald Oussoren
- Add a freelist for PyObjCObject, I'm not yet sure if this really helps, a freelist for PyObjCSelector would probably be more usefull. - Fix bug in previous patch: we'd sometimes try to free the '-1' methodlist :-( - Update TODO
Ronald Oussoren
- unicode-object.m, NEWS: Add pickling support, we pickle in such way that our unicode objects are restored as normal unicode objects - objc-object.m, NEWS: Add __reduce__ method to make sure pickling won't work, not even with protocol version 2. Without this fix, pickling with protocol version 2 would dump incomplete objects. - setup.py: Fix dependencies and PyPI information - class-builder.m: Workaround for undocumented runtime feature: the method lists us…
Ronald Oussoren
- Remove the experimantal performance improvement, it doesn't really work. - Some documentation cleanup - Fix NSEndSheetMethod -> endSheetMethod + fix implementation - The Python interpreter tries to access a number of special attributes during normal operation, such as subclassing. This caused an unnecessary methodscan for lots of classes, special-case those methods. This significantly speeds up "python -c 'import AppKit'" (30% faster).
Ronald Oussoren
- Passed the same value of the name and reason while converting exceptions from objc to python. - The -dealloc of Python classes erased existing exceptions, causing problems if it was called during the traceback of an exception.
Ronald Oussoren
/tmp/cvs9NJIkx
Ronald Oussoren
- Enable more warnings during compilation, and fix the resulting messages - Add wrappers for decoding of plain ObjC types (NSCoding) - Add NS{Mutable,}Dictionary.items() - Regenerate Doc/*.html - Add a document that will contain information about how the Cocoa API's as exposed by PyObjC are different from the Objective-C API's. - Add script to run all tests in 1 python session, this is a script by Dinu Gherman with minor updates by me.
Ronald Oussoren
+-----+ | * * | <-- Ronald in a brown paper bag :-( | | I found the culprit for the problems I was having with the +-----+ move of instance state to Objective-C: Some bogus code in | | class-builder.m. This patch also cleans up the unittests (remove 'suite' definitions, these weren't used anyway). Dinu's allTestsTogether.py caused some crashes, these are also fixed.
Ronald Oussoren
- Temporarily move instance state back into Python, the newer code is not stable enough. - Enable more compiler warnings, and fix at least some of them
Ronald Oussoren
- More cleanups - This also fixes some refcounting problems in objc_util.m Python 2.2 builds are horribly broken at the moment, this looks refcount related.
Ronald Oussoren
- Remove OC_PythonInt, the class is not used. - __del__ of objC subclasses works again. - some python refcount updates
Ronald Oussoren
- Instance-state is completely stored in Objective-C, we no longer have a "siamese twin" pair of ObjC and Python objects. - As a side-effect of the previous item it is now possible to use poseAs: (as in "it doesn't crash", I haven't tested if this actually works). - Pure objective-C objects no longer have a __dict__, the __dict__ of proxies was a bug. This code is pretty rough, and there are some bugs left. Most importantly: __del__ is called when the last reference from Python goes away, and not when the object dies. As a work-around you can use __pyobjcdel__ instead, I'm working on a better fix.
Ronald Oussoren
- Completely remove non-libffi support, including some code cleanups. This removes a lot of code (not only the entire file register.m, but also lots of duplicate code in Modules/{Foundation,AppKit}. - Minor update to test_nsnumber.py to make sure it works on MacOS X 10.1 - Added tests for Objective-C instance variables. - Add custom wrappers for NSMovie.initWithMovie_ and NSMovie.QTMovie. Actually using these requires MacPython 2.3. - Update NEWS file for thes…
Ronald Oussoren
- Cleanup MacOS X 10.1 support - Libffi does compile on 10.1, only the test program 'ffitest.c' fails, more updates for an libffi-enabled build on 10.1. - objc_support.h should not be used outside of Modules/objc, two functions to pyobjc-api.h that make this possible. Also update the other modules. - 10.1 support is making progress, some tests pass. Mosts tests (and real programs) give segmentation faults.
Ronald Oussoren
This patch introduces the PyObjCTools package, and moves Foundation.Conversion and AppKit.NibClassBuilder to that package. It also adds a new module containing the runEvenloop function proposed by Just (includeing the improvements proposed by Jack, and some bugs introduced by me). The examples and project-templates have been adapted to this change. Also includes a fix for 'NSMachPort.alloc()', which used to crash: We no longer call 'retain' on the result of 'alloc' messages. Because of this I've also enabled the option that updates the retainCount for methods that return non-autoreleased objects (e.g. copy and friends). This should keep live simpler.
Ronald Oussoren
- Fix compile-time warnings in Modules/{AppKit,Foundation} - Fix compile-error with Python 2.2. "I shall not perform obviously correct changes just before checking in" * 100 Sorry about this.
Ronald Oussoren
More renaming of public functions and minor changes to layout.
  1. Prev
  2. 1
  3. 2
  4. Next