~ubuntu-branches/ubuntu/saucy/python2.7/saucy-proposed

« back to all changes in this revision

Viewing changes to Modules/signalmodule.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-05-15 19:15:16 UTC
  • mto: (36.1.23 sid)
  • mto: This revision was merged to the branch mainline in revision 87.
  • Revision ID: package-import@ubuntu.com-20130515191516-zmv6to904wemey7s
Tags: upstream-2.7.5
ImportĀ upstreamĀ versionĀ 2.7.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
321
321
    Handlers[sig_num].tripped = 0;
322
322
    Py_INCREF(obj);
323
323
    Handlers[sig_num].func = obj;
324
 
    return old_handler;
 
324
    if (old_handler != NULL)
 
325
        return old_handler;
 
326
    else
 
327
        Py_RETURN_NONE;
325
328
}
326
329
 
327
330
PyDoc_STRVAR(signal_doc,
349
352
        return NULL;
350
353
    }
351
354
    old_handler = Handlers[sig_num].func;
352
 
    Py_INCREF(old_handler);
353
 
    return old_handler;
 
355
    if (old_handler != NULL) {
 
356
        Py_INCREF(old_handler);
 
357
        return old_handler;
 
358
    }
 
359
    else {
 
360
        Py_RETURN_NONE;
 
361
    }
354
362
}
355
363
 
356
364
PyDoc_STRVAR(getsignal_doc,