2 ** mac __start for python-with-shared-library.
4 ** Partially stolen from MW Startup.c, which is
5 ** Copyright © 1993 metrowerks inc. All Rights Reserved.
11 extern jmp_buf __program_exit
; /* exit() does a longjmp() to here */
12 extern void (*__atexit_hook
)(void); /* atexit() sets this up if it is ever called */
13 extern void (*___atexit_hook
)(void); /* _atexit() sets this up if it is ever called */
14 extern int __aborting
; /* abort() sets this and longjmps to __program_exit */
18 * clear_stackframe_backlink - set 0(SP) to 0
22 static asm void clear_stackframe_backlink(void)
34 if (setjmp(__program_exit
) == 0) { // set up jmp_buf for exit()
35 main(0, &argv
); // call main(argc, argv)
37 __atexit_hook(); // call atexit() procs
41 ___atexit_hook(); // call _atexit() procs
45 clear_stackframe_backlink();