Re: [Factor-talk] Bug in C-STRUCT: ?
Seems to work correctly now. Thanks. On Feb 5, 2008, at 2:26 AM, Slava Pestov wrote: Hi, This is now fixed in the latest git. Slava - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Bug in C-STRUCT: ?
Hi, This is now fixed in the latest git. Slava Jorge Acereda Maciá wrote: I think I'm facing a bug in Factor. I have something like this: TYPEDEF: double PaTime C-STRUCT: PaDeviceInfo { int structVersion } { char* name } { PaHostApiIndex hostApi } { int maxInputChannels } { int maxOutputChannels } { PaTime defaultLowInputLatency } { PaTime defaultLowOutputLatency } { PaTime defaultHighInputLatency } { PaTime defaultHighOutputLatency } { double defaultSampleRate } ; The C library returns correct values for the PaTime fields and the double field (I checked in GDB). But in Factor, all double values have absurd values.The rest are OK. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Bug in C-STRUCT: ?
It seems it's an alignment problem. gcc doesn't seem to align the double fields to 8 bytes under x86, and factor seems to enforce 8 bytes alignment for doubles. Am I right? On Sat, Jan 26, 2008 at 9:52 PM, Jorge Acereda [EMAIL PROTECTED] wrote: Forgot to say that I'm using the git version on a Mac OS X / x86 On Sat, Jan 26, 2008 at 9:30 PM, Jorge Acereda Maciá [EMAIL PROTECTED] wrote: I think I'm facing a bug in Factor. I have something like this: TYPEDEF: double PaTime C-STRUCT: PaDeviceInfo { int structVersion } { char* name } { PaHostApiIndex hostApi } { int maxInputChannels } { int maxOutputChannels } { PaTime defaultLowInputLatency } { PaTime defaultLowOutputLatency } { PaTime defaultHighInputLatency } { PaTime defaultHighOutputLatency } { double defaultSampleRate } ; The C library returns correct values for the PaTime fields and the double field (I checked in GDB). But in Factor, all double values have absurd values.The rest are OK. TIA, Jorge Acereda - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Bug in C-STRUCT: ?
Jorge Acereda wrote: It seems it's an alignment problem. gcc doesn't seem to align the double fields to 8 bytes under x86, and factor seems to enforce 8 bytes alignment for doubles. Am I right? Sounds possible. I'll investigate. Slava - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk