On Thu, Jun 12, 2008 at 4:14 PM, Lisandro Dalcin <[EMAIL PROTECTED]> wrote: > On 6/12/08, Carl Witty <[EMAIL PROTECTED]> wrote: >> I don't think the solution is nearly so complicated. Can't you just >> cast the function to the correct type? >> >> vtable_Parrot.describe = (void (*)(struct Parrot *))Norwegian_describe; > > Well, the type of 'Norwegian_describe' is acctually 'void (*)(struct > *Norwegian)'. If those types aren't aliasables, then that will break > strict aliasing rules. What I do not know if in this case the funtions > types can alias each other (I guess they cannot).
No; you only break aliasing rules if you read or write a value through a pointer of the wrong type. The above code doesn't do that. Carl _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
