[mb-devel] Re: Ruby bindings for libdiscid

Lukáš Lalinský lalinsky at gmail.com
Tue Jun 5 07:20:20 UTC 2007


On Ut, 2007-06-05 at 09:17 +0200, Lukáš Lalinský wrote:
> On Ut, 2007-06-05 at 01:00 +0200, Philipp Wolfer wrote:
> > P.S.:It would be great if somebody with some Visual Studio experience
> > could tell me, that the ugly, useless brackets I build into the source
> > for MS compatibility are not really necessary ;-) Perhaps there is a
> > better solution.
> 
> I'm not sure if C99 allows you to do variable declarations in the middle
> of the code, but ANSI C doesn't. So if you want compatible C code, I'd
> suggest to move them to the begin of a function:
> 
> static VALUE mb_discid_tracks(VALUE self)
> {
> 	DiscId *disc;
> 	VALUE result; // Array of all [offset, length] tuples
> 	VALUE tuple; // Array to store one [offset, length] tuple.
> 	int track; // Track number

Er, and obviously one more thing, // comments are not ANSI C either. :)

	VALUE result; /* Array of all [offset, length] tuples */
	VALUE tuple; /* Array to store one [offset, length] tuple. */
	int track; /* Track number */

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?ISO-8859-1?Q?digit=E1lne?=
	=?ISO-8859-1?Q?_podp=EDsan=E1?= =?UTF-8?Q?_=C4=8Das=C5=A5?=
	=?ISO-8859-1?Q?_spr=E1vy?=
Url : http://lists.musicbrainz.org/pipermail/musicbrainz-devel/attachments/20070605/fa73fb23/attachment.pgp


More information about the MusicBrainz-devel mailing list