discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attributed string Macro in TalkSoup


From: Ivan Vučica
Subject: Re: attributed string Macro in TalkSoup
Date: Tue, 10 Sep 2013 18:36:58 +0200

Without looking at code...

- commands.m:368 might contain a constant string, which would explain why the 
pointer would always be non-nil.
- I cannot come up with what mismatch might be occurring in main.m:48. Perhaps 
the left side of an assignment expects something apart from a 
NSAttributedString?

Regards,

Ivan Vučica
via phone

On 10. 9. 2013., at 18:33, Riccardo Mottola <riccardo.mottola@libero.it> wrote:

> Hi,
> 
> do you see anything wrong with this macro?
> 
> #define S2AS(_x) ( (_x) ? [[[NSAttributedString alloc] initWithString: (_x)] 
> autorelease] : nil )
> 
> It is then called by passing a string like @"hi".
> 
> I added the ternary operator to return nil if nil is passed.
> 
> When used in TalkSoup, I get these two errors:
> 
> commands.m:368: warning: the address of '_OBJC_INSTANCE_30' will always 
> evaluate as 'true'
> commands.m: In function '-[TalkSoup(Commands) commandClientinfo:connection:]':
> 
> main.m: In function '-[NetclassesConnection 
> changeNick:onConnection:withNickname:sender:]':
> main.m:418: warning: pointer type mismatch in conditional expression
> 
> (repeated in different places / methods).
> 
> Riccardo
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]