Created
February 4, 2010 18:43
-
-
Save llimllib/294962 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static PyObject * | |
sys_exit(PyObject *self, PyObject *args) | |
{ | |
PyObject *exit_code = 0; | |
if (!PyArg_UnpackTuple(args, "exit", 0, 1, &exit_code)) | |
return NULL; | |
/* Raise SystemExit so callers may catch it or clean up. */ | |
PyErr_SetObject(PyExc_SystemExit, exit_code); | |
return NULL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment