Martin v. Löwis <mar...@v.loewis.de> added the comment:

> Ok. In Python 2.x, selfptr is NULL whereas selfptr is a pointer to the 
> module in Python 3.x. New attached patch uses PyModule_Check() to 
> check if selfptr is the module or an object.

The patch looks right in principle. Please make sure not to include
printf calls in it.

Please also consider all similar cases, such as Tkapp_CreateFileHandler.

>> if that function is removed, the code to support 
>> it should also be removed.
> 
> Which code? 

The code inside the function: all tests whether self is NULL. If
mainloop would stop being a module function, this code also should go.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3638>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to