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;

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

28 * Authors: Nathan Binkert
29 */
30
31#ifndef __SIM_INIT_HH__
32#define __SIM_INIT_HH__
33
34#include <Python.h>
35
36/*
37 * Data structure describing an embedded python file.
38 */
36#include <list>
37#include <string>
38
39#include <inttypes.h>
40
41#ifndef PyObject_HEAD
42struct _object;
43typedef _object PyObject;
44#endif
45
46/*
47 * Data structure describing an embedded python file.
48 */
49struct EmbeddedPython
50{
51 const char *filename;
52 const char *abspath;
53 const char *modpath;
54 const uint8_t *code;
55 int zlen;
56 int len;

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

66 static std::list<EmbeddedPython *> &getList();
67 static int initAll();
68};
69
70struct EmbeddedSwig
71{
72 void (*initFunc)();
73
73 EmbeddedSwig(void (*init_func)());
74 std::string context;
75
76 EmbeddedSwig(void (*init_func)(), const std::string& _context);
77
78 static std::list<EmbeddedSwig *> &getList();
79 static void initAll();
80};
81
82int initM5Python();
83int m5Main(int argc, char **argv);
84PyMODINIT_FUNC initm5(void);
85
86#endif // __SIM_INIT_HH__