Re: [cc65] Interrupt handlers in C as part of the C library ?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2012-01-21 23:03:16
Hi!

On Sat, Jan 21, 2012 at 02:20:49PM +0100, Oliver Schmidt wrote:
> >> typedef unsigned (*irq_handler) (void);
> >
> > Bad style, I would highly advise to use the "int".
>
> If you refer to the return value than this is how Uz wanted it to be -
> or at least how I understood him that he wanted it to be.

My suggestion was actually to use "unsigned char", not "unsigned". But apart
from that, I do not agree with Spiro. Using "int" in every place is a bad
idea. I've suffered from some nasty bugs in the past that were caused by this
"everything must be an int" rule.

I don't want to start a style discussion, so just let me say that I think, the
definitions are ok. As said above, I would have used unsigned char, but I can
also live with unsigned.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Jan 21 23:03:22 2012

This archive was generated by hypermail 2.1.8 : 2012-01-21 23:03:24 CET