Message150462
| Author | rosslagerwall |
|---|---|
| Recipients | Arfrever, amaury.forgeotdarc, denilsonsa, giampaolo.rodola, loewis, neologix, pitrou, rosslagerwall, zbysz |
| Date | 2012-01-02.16:46:52 |
| SpamBayes Score | 1.2365392e-06 |
| Marked as misclassified | No |
| Message-id | <1325522814.07.0.278832095525.issue13609@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Nice patch :-) I think the two function approach works well. Since you have already checked that termsize is not NULL, Py_DECREF can be used instead of Py_CLEAR. Would it not be better to use sys.__stdout__ instead of 1 in the documentation and to use STDOUT_FILENO instead of 1 in the code? A brief google suggested that Solaris requires sys/termios.h for TIOCGWINSZ. Perhaps also only define TERMSIZE_USE_IOCTL if TIOCGWINSZ is defined. Like so: #if defined(HAVE_SYS_IOCTL_H) #include <sys/ioctl.h> #if defined(TIOCGWINSZ) #define TERMSIZE_USE_IOCTL #else #define TERMSIZE_USE_NOTIMPLEMENTED #endif #elif defined(HAVE_CONIO_H) #include <windows.h> #include <conio.h> #define TERMSIZE_USE_CONIO #else #define TERMSIZE_USE_NOTIMPLEMENTED #endif (didn't check the windows parts) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2012-01-02 16:46:54 | rosslagerwall | set | recipients: + rosslagerwall, loewis, amaury.forgeotdarc, pitrou, giampaolo.rodola, Arfrever, zbysz, denilsonsa, neologix |
| 2012-01-02 16:46:54 | rosslagerwall | set | messageid: <1325522814.07.0.278832095525.issue13609@psf.upfronthosting.co.za> |
| 2012-01-02 16:46:53 | rosslagerwall | link | issue13609 messages |
| 2012-01-02 16:46:52 | rosslagerwall | create | |