Odd typedef error

27 views
Skip to first unread message

Floris Bruynooghe

unread,
Jan 15, 2014, 7:44:18 AM1/15/14
to pytho...@googlegroups.com
Hi,

I have an odd problem with a typedef which I can't work out if it's my
fault or not. I need to define dev64_t which is an uint64_t.
However this gives me errors:

CDefError: cannot parse "typedef uint64_t dev64_t;"

However the following two do work (the first which is obviously wrong):

typedef int64_t dev64_t;
typedef unsigned long long dev64_t;

The second is a fine work around but the fact that using int64_t works
but not uint64_t makes me suspicious that this might be a bug
somewhere? I'm not sure though which is why I'm asking here instead
of filing a bug.

Regards,
Floris

--
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org

Armin Rigo

unread,
Jan 15, 2014, 11:44:19 AM1/15/14
to pytho...@googlegroups.com
Hi,

On Wed, Jan 15, 2014 at 1:44 PM, Floris Bruynooghe <fl...@devork.be> wrote:
> CDefError: cannot parse "typedef uint64_t dev64_t;"

This works for me:

import cffi
ffi = cffi.FFI()
ffi.cdef("typedef uint64_t dev64_t;")

Can we see a complete example where it doesn't work?


A bientôt,

Armin.

Floris Bruynooghe

unread,
Jan 16, 2014, 7:28:37 AM1/16/14
to pytho...@googlegroups.com
Hello Armin,
While trying to narrow down the problem to a workable example I've
found the issue which turned out to be a simple mistake of mine. I
was typedefing uint64_t myself but didn't notice since this is
generated from a dict collected from several files.

Apologies for the noise.
Reply all
Reply to author
Forward
0 new messages