- Notifications
You must be signed in to change notification settings - Fork5
Commitf73b2bb
committed
Fix poorly thought-through code from commit5c3c3cd.
It's not entirely clear to me whether PyString_AsString can returnnull (looks like the answer might vary between Python 2 and 3).But in any case, this code's attempt to cope with the possibilitywas quite broken, because pstrdup() neither allows a null argumentnor ever returns a null.Moreover, the code below this point assumes that "message" is apalloc'd string, which would not be the case for a dgettext result.Fix both problems by doing the pstrdup step separately.1 parent074050f commitf73b2bb
1 file changed
+4
-2
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
424 | 424 |
| |
425 | 425 |
| |
426 | 426 |
| |
427 |
| - | |
| 427 | + | |
428 | 428 |
| |
429 | 429 |
| |
430 | 430 |
| |
431 | 431 |
| |
| 432 | + | |
432 | 433 |
| |
433 | 434 |
| |
434 | 435 |
| |
| |||
444 | 445 |
| |
445 | 446 |
| |
446 | 447 |
| |
447 |
| - | |
| 448 | + | |
| 449 | + | |
448 | 450 |
| |
449 | 451 |
| |
450 | 452 |
| |
|
0 commit comments
Comments
(0)