Deleted Added
sdiff udiff text old ( 13620:e0d9b09788f6 ) new ( 13662:3e072654ca86 )
full compact
1/*
2 * Copyright (c) 2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 40 unchanged lines hidden (view full) ---

49 std::unique_ptr<wchar_t[], decltype(&PyMem_RawFree)> program(
50 Py_DecodeLocale(argv[0], NULL),
51 &PyMem_RawFree);
52 Py_SetProgramName(program.get());
53#else
54 Py_SetProgramName(argv[0]);
55#endif
56
57 // initialize embedded Python interpreter
58 Py_Initialize();
59
60 // Initialize the embedded m5 python library
61 ret = initM5Python();
62
63 if (ret == 0) {
64 // start m5
65 ret = m5Main(argc, argv);
66 }
67
68 // clean up Python intepreter.
69 Py_Finalize();
70
71 return ret;
72}