Re: [Rhythmbox-devel] DACP (iTunes remote) support added
- From: Jonathan Matthew <jonathan d14n org>
- To: Alexandre Rosenfeld <alexandre rosenfeld gmail com>
- Cc: rhythmbox-devel gnome org
- Subject: Re: [Rhythmbox-devel] DACP (iTunes remote) support added
- Date: Tue, 19 Oct 2010 09:36:06 +1000
On Tue, Oct 19, 2010 at 8:10 AM, Alexandre Rosenfeld
<alexandre rosenfeld gmail com> wrote:
> On Mon, Oct 18, 2010 at 17:01, Bastien Nocera <hadess hadess net> wrote:
>> If you're hoping to use a pointer there, just make it a pointer, instead
>> of seemingly trying to work around it.
>
> It's not a pointer, it's just a way to workaround the fact that Rhythmbox
> doesnt have id's for albums and DACP requires one, so we use the refstring
> pointer location (which should be constant through a Rhythmbox execution) to
> always get the same number for a string (in this case, an album name).
> I thought the code would work because it would cast a 32-bit pointer (4
> bytes) into a 64-bit integer in 32-bit machines. And in 64-bits it works
> normally.
> Any suggestion to make this work?
I've fixed this by casting the pointer to gintptr, which is an integer
type the same size as a pointer. From there, the compiler promotes it
to gint64 if it needs to.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]