Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Python/frozenmain.c

    r2 r388  
    1515Py_FrozenMain(int argc, char **argv)
    1616{
    17         char *p;
    18         int n, sts;
    19         int inspect = 0;
    20         int unbuffered = 0;
     17    char *p;
     18    int n, sts;
     19    int inspect = 0;
     20    int unbuffered = 0;
    2121
    22         Py_FrozenFlag = 1; /* Suppress errors from getpath.c */
     22    Py_FrozenFlag = 1; /* Suppress errors from getpath.c */
    2323
    24         if ((p = Py_GETENV("PYTHONINSPECT")) && *p != '\0')
    25                 inspect = 1;
    26         if ((p = Py_GETENV("PYTHONUNBUFFERED")) && *p != '\0')
    27                 unbuffered = 1;
     24    if ((p = Py_GETENV("PYTHONINSPECT")) && *p != '\0')
     25        inspect = 1;
     26    if ((p = Py_GETENV("PYTHONUNBUFFERED")) && *p != '\0')
     27        unbuffered = 1;
    2828
    29         if (unbuffered) {
    30                 setbuf(stdin, (char *)NULL);
    31                 setbuf(stdout, (char *)NULL);
    32                 setbuf(stderr, (char *)NULL);
    33         }
     29    if (unbuffered) {
     30        setbuf(stdin, (char *)NULL);
     31        setbuf(stdout, (char *)NULL);
     32        setbuf(stderr, (char *)NULL);
     33    }
    3434
    3535#ifdef MS_WINDOWS
    36         PyInitFrozenExtensions();
     36    PyInitFrozenExtensions();
    3737#endif /* MS_WINDOWS */
    38         Py_SetProgramName(argv[0]);
    39         Py_Initialize();
     38    Py_SetProgramName(argv[0]);
     39    Py_Initialize();
    4040#ifdef MS_WINDOWS
    41         PyWinFreeze_ExeInit();
     41    PyWinFreeze_ExeInit();
    4242#endif
    4343
    44         if (Py_VerboseFlag)
    45                 fprintf(stderr, "Python %s\n%s\n",
    46                         Py_GetVersion(), Py_GetCopyright());
     44    if (Py_VerboseFlag)
     45        fprintf(stderr, "Python %s\n%s\n",
     46            Py_GetVersion(), Py_GetCopyright());
    4747
    48         PySys_SetArgv(argc, argv);
     48    PySys_SetArgv(argc, argv);
    4949
    50         n = PyImport_ImportFrozenModule("__main__");
    51         if (n == 0)
    52                 Py_FatalError("__main__ not frozen");
    53         if (n < 0) {
    54                 PyErr_Print();
    55                 sts = 1;
    56         }
    57         else
    58                 sts = 0;
     50    n = PyImport_ImportFrozenModule("__main__");
     51    if (n == 0)
     52        Py_FatalError("__main__ not frozen");
     53    if (n < 0) {
     54        PyErr_Print();
     55        sts = 1;
     56    }
     57    else
     58        sts = 0;
    5959
    60         if (inspect && isatty((int)fileno(stdin)))
    61                 sts = PyRun_AnyFile(stdin, "<stdin>") != 0;
     60    if (inspect && isatty((int)fileno(stdin)))
     61        sts = PyRun_AnyFile(stdin, "<stdin>") != 0;
    6262
    6363#ifdef MS_WINDOWS
    64         PyWinFreeze_ExeTerm();
     64    PyWinFreeze_ExeTerm();
    6565#endif
    66         Py_Finalize();
    67         return sts;
     66    Py_Finalize();
     67    return sts;
    6868}
Note: See TracChangeset for help on using the changeset viewer.