• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: discards qualifiers from pointer target type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: discards qualifiers from pointer target type


  • Subject: Re: discards qualifiers from pointer target type
  • From: publiclook <email@hidden>
  • Date: Sat, 1 Mar 2003 19:03:36 -0500

The string returned from cString is REALLY constant. If -sendLCDcmd: expects to be able to modify the string argument, you have big problems with the code below. If -sendLCDcmd: doesn't modify the string argument then you should preserve the const.

On Saturday, March 1, 2003, at 02:37 PM, Chuck Rice wrote:

At 9:22 PM +0200 3/1/03, Dan Bernstein wrote:
Because NSString's cString method is defined
- (const char *)cString
and sendLCDcmd takes a char *.


[self sendLCDcmd:(char *)[[NSString stringWithFormat:@"%s%c",BACKLIGHTON,p] cString]];

Fixed it. Thanks! -Chuck-
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: discards qualifiers from pointer target type (From: Chuck Rice <email@hidden>)

  • Prev by Date: Project Builder Bugginess
  • Next by Date: Re: More on releasing NSImages
  • Previous by thread: Re: discards qualifiers from pointer target type
  • Next by thread: Re: discards qualifiers from pointer target type
  • Index(es):
    • Date
    • Thread