[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ANN] PyObjC for GNUstep
From: |
David Chisnall |
Subject: |
Re: [ANN] PyObjC for GNUstep |
Date: |
Thu, 21 Jul 2011 13:20:47 +0100 |
On 21 Jul 2011, at 13:13, Stefan Bidi wrote:
> On Thu, Jul 21, 2011 at 2:10 AM, Fred Kiefer <fredkiefer@gmx.de> wrote:
>> I am not interested in Python, but looked over your changes to see what
>> functionality is missing or different in GNUstep. One thing that I noticed
>> was that this code expects that result of a copy operation on an
>> NSMutableArray is a mutable array, and that on GNUstep you had to use
>> mutableCopy. If this is true we should change the GNustep behaviour and add
>> a test case for this.
>> Any other interesting stuff you found while working on this?
>
> That's probably because NS(Mutable)Array objects in Cocoa are actually
> NSCFArray objects (due to the toll-free bridging mechanism), which can be
> either mutable or immutable.
I just tested it, and the GNUstep behaviour is correct. [NSMutableArray -copy]
does return an immutable array:
NSMutableArray *a = [NSMutableArray new];
id b = [a copy];
[b addObject: @"foo"];
This terminates with an exception:
2011-07-21 13:17:19.940 a.out[15566:903] *** Terminating app due to uncaught
exception 'NSInternalInconsistencyException', reason: '*** -[NSCFArray
insertObject:atIndex:]: mutating method sent to immutable object'
So, it's probably one of the many bits in the PyObjC code that didn't work on
GNUstep because it was Just Plain Wrong™ and shouldn't work on OS X either.
David
- [ANN] PyObjC for GNUstep, David Chisnall, 2011/07/20
- Re: [ANN] PyObjC for GNUstep, Fred Kiefer, 2011/07/21
- Re: [ANN] PyObjC for GNUstep, Ivan Vučica, 2011/07/21
- Re: [ANN] PyObjC for GNUstep, David Chisnall, 2011/07/21
- Re: [ANN] PyObjC for GNUstep, Ludovic Marcotte, 2011/07/21
- Re: [ANN] PyObjC for GNUstep, Gerold Rupprecht, 2011/07/21
- Re: [ANN] PyObjC for GNUstep, Sebastian Reitenbach, 2011/07/21
- Re: [ANN] PyObjC for GNUstep, Ludovic Marcotte, 2011/07/21
- Re: [ANN] PyObjC for GNUstep, Germán Arias, 2011/07/21
- Re: [ANN] PyObjC for GNUstep, Ludovic Marcotte, 2011/07/22
- Re: [ANN] PyObjC for GNUstep, Gregory Casamento, 2011/07/21
- Re: [ANN] PyObjC for GNUstep, Jens Ayton, 2011/07/21