init.hh (7674:8e3734851770) init.hh (8946:fb6c89334b86)
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;

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

31#ifndef __SIM_INIT_HH__
32#define __SIM_INIT_HH__
33
34/*
35 * Data structure describing an embedded python file.
36 */
37#include <list>
38
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;

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

31#ifndef __SIM_INIT_HH__
32#define __SIM_INIT_HH__
33
34/*
35 * Data structure describing an embedded python file.
36 */
37#include <list>
38
39#include <inttypes.h>
40
39#ifndef PyObject_HEAD
40struct _object;
41typedef _object PyObject;
42#endif
43
44struct EmbeddedPython
45{
46 const char *filename;
47 const char *abspath;
48 const char *modpath;
41#ifndef PyObject_HEAD
42struct _object;
43typedef _object PyObject;
44#endif
45
46struct EmbeddedPython
47{
48 const char *filename;
49 const char *abspath;
50 const char *modpath;
49 const char *code;
51 const uint8_t *code;
50 int zlen;
51 int len;
52
53 EmbeddedPython(const char *filename, const char *abspath,
52 int zlen;
53 int len;
54
55 EmbeddedPython(const char *filename, const char *abspath,
54 const char *modpath, const char *code, int zlen, int len);
56 const char *modpath, const uint8_t *code, int zlen, int len);
55
56 PyObject *getCode() const;
57 bool addModule() const;
58
59 static EmbeddedPython *importer;
60 static PyObject *importerModule;
61 static std::list<EmbeddedPython *> &getList();
62 static int initAll();

--- 17 unchanged lines hidden ---
57
58 PyObject *getCode() const;
59 bool addModule() const;
60
61 static EmbeddedPython *importer;
62 static PyObject *importerModule;
63 static std::list<EmbeddedPython *> &getList();
64 static int initAll();

--- 17 unchanged lines hidden ---