syscall_emul: standardized file descriptor name and add return checks.
[gem5.git] / src / sim / init.hh
index 8fc0be9822ef7a7bd287562671a5d0d362651f96..766cb43654250c148575ce200951d5981fcf51ad 100644 (file)
 #ifndef __SIM_INIT_HH__
 #define __SIM_INIT_HH__
 
+#include <Python.h>
+
 /*
  * Data structure describing an embedded python file.
  */
 #include <list>
 
+#include <inttypes.h>
+
 #ifndef PyObject_HEAD
 struct _object;
 typedef _object PyObject;
@@ -46,12 +50,12 @@ struct EmbeddedPython
     const char *filename;
     const char *abspath;
     const char *modpath;
-    const char *code;
+    const uint8_t *code;
     int zlen;
     int len;
 
     EmbeddedPython(const char *filename, const char *abspath,
-        const char *modpath, const char *code, int zlen, int len);
+                   const char *modpath, const uint8_t *code, int zlen, int len);
 
     PyObject *getCode() const;
     bool addModule() const;
@@ -72,8 +76,8 @@ struct EmbeddedSwig
     static void initAll();
 };
 
-void initSignals();
 int initM5Python();
 int m5Main(int argc, char **argv);
+PyMODINIT_FUNC initm5(void);
 
 #endif // __SIM_INIT_HH__