bugGNUstep - Bugs: bug #37575, Incorrect return type for...


You are not allowed to post comments on this tracker with your current authentication level.

bug #37575: Incorrect return type for NSCharacterSet methods

Submitted by:  Thomas Davie <beelsebob>
Submitted on:  Mon Oct 15 10:04:15 2012  
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue Oct 16 07:13:24 2012, comment #3:

Just as a quick addendum... Apple added support for a new type "instancetype" in clang, which represents the instance type of whatever class the method is running in. They still use id as the return type for their init methods, but it strikes me that alloc/init is the perfect place to use it.

Thomas Davie <beelsebob>
Tue Oct 16 04:49:47 2012, comment #2:

I updated the code in svn.

Richard Frith-Macdonald <CaS>
Project Member
Mon Oct 15 13:56:55 2012, comment #1:

Excellent ... it seems Apple have changed their implementation to use id, so we can now do the same.

Richard Frith-Macdonald <CaS>
Project Member
Mon Oct 15 10:04:15 2012, original submission:

NSCharacterSet's various convenience constructor methods are declared in GNUstep to return NSCharacterSet , rather than id. This causes the warning "warning: incompatible pointer types initializing 'NSMutableCharacterSet ' with an expression of type 'NSCharacterSet *' [-Wincompatible-pointer-types]" when declaring an NSMutableCharacterSet as so:

NSMutableCharacterSet *mcs = [NSMutableCharacterSet whitespaceCharacterSet];

Thomas Davie <beelsebob>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by beelsebob (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Oct 16 04:49:47 2012CaSStatusNone=>Fixed

    Back to the top

    Powered by Savane 3.1-cleanup1