On Tue, Nov 2, 2010 at 2:20 PM, Vitja Makarov <[email protected]> wrote:
> It worked!

Excellent! Do you have a patch?

> I've enabled binding and used ExprNodes.PyCFunctionNode instead of
> ExprNodes.PyCFunctionNode in DefNode.synthesize_assignment_node().
>
> Btw __new__ is still decorated with @staticmethod...
> To solve this PyCFunctionNode should be used for __new__ and probably
> for all static methods?

__new__ should be a class method, not a static method, right? This
trick should work fine for static methods. Also, I should note that
__new__ will require a bit more work to implement fully.

> 2010/11/2 Robert Bradshaw <[email protected]>:
>> On Tue, Nov 2, 2010 at 2:48 AM, Vitja Makarov <[email protected]> 
>> wrote:
>>> 2010/11/2 Vitja Makarov <[email protected]>:
>>>> ps:
>>>>
>>>> with my patch I got:
>>>> failures=29, errors=4
>>>>
>>>
>>> First I tried to create method with NULL
>>> PyMethod_New(__pyx_t_2, 0, NULL);
>>>
>>> But that doesn't worked for @staticmethod that gives SIGSEGV so I turned it 
>>> into
>>> PyMethod_New(__pyx_t_2, 0, (PyObject *) &PyBaseObject_Type);
>>>
>>> But that doesn't work for simple classes, only for object based...
>>
>> This is the issue that Greg Ewing was mentioning--you can't make a
>> method until you have a class. You'll have to make (binding) function
>> objects, which get turned into methods at class creation time.
>>
>> - Robert
>> _______________________________________________
>> Cython-dev mailing list
>> [email protected]
>> http://codespeak.net/mailman/listinfo/cython-dev
>>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to