Re: [Cython] Problem with final cdef methods

2013-08-29 Thread Stefan Behnel
Nikita Nemkin, 29.08.2013 09:19: > On Thu, 29 Aug 2013 12:57:19 +0600, Stefan Behnel wrote: >> Nikita Nemkin, 29.08.2013 08:24: >>> I have solved it for myself by storing BOTH types in the method entry >>> (Entry.type for the actual CFuncDef type and Entry.prev_type for the vtable >>> slot type). B

Re: [Cython] Problem with final cdef methods

2013-08-29 Thread Stefan Behnel
Nikita Nemkin, 29.08.2013 09:19: > The test was already disabled, because it hit the open bug. > My patch ENABLES the test because it fixes the bug. Sorry, sure. I accidentally read it the other way round. Once the fix is in, I think both tests should just be merged. Stefan

Re: [Cython] Problem with final cdef methods

2013-08-29 Thread Nikita Nemkin
On Thu, 29 Aug 2013 12:57:19 +0600, Stefan Behnel wrote: Nikita Nemkin, 29.08.2013 08:24: I have solved it for myself by storing BOTH types in the method entry (Entry.type for the actual CFuncDef type and Entry.prev_type for the vtable slot type). By using correct types in generate_exttyp

Re: [Cython] Problem with final cdef methods

2013-08-28 Thread Stefan Behnel
Nikita Nemkin, 29.08.2013 08:24: > On Thu, 29 Aug 2013 11:03:01 +0600, Stefan Behnel wrote: >> http://trac.cython.org/cython_trac/ticket/819 > > As your ticket mentions, there is a fundamental problem with method > inheritance. > (and with the way Cython generates forward declarations...) > > Any

Re: [Cython] Problem with final cdef methods

2013-08-28 Thread Nikita Nemkin
On Thu, 29 Aug 2013 11:03:01 +0600, Stefan Behnel wrote: I noticed two problems with final cdef methods. When overriding a normal cdef method with a final cdef method, you currently get a C compiler warning about a call with the wrong 'self' type, and when you call them before you declare the

Re: [Cython] Problem with final cdef methods

2013-08-28 Thread Vitja Makarov
2013/8/29 Stefan Behnel : > Hi, > > I noticed two problems with final cdef methods. When overriding a normal > cdef method with a final cdef method, you currently get a C compiler > warning about a call with the wrong 'self' type, and when you call them > before you declare them in your code, you g

[Cython] Problem with final cdef methods

2013-08-28 Thread Stefan Behnel
Hi, I noticed two problems with final cdef methods. When overriding a normal cdef method with a final cdef method, you currently get a C compiler warning about a call with the wrong 'self' type, and when you call them before you declare them in your code, you get an error because the method is not