init.cc (8234:a08c5fb4cd89) | init.cc (8946:fb6c89334b86) |
---|---|
1/* 2 * Copyright (c) 2000-2005 The Regents of The University of Michigan 3 * Copyright (c) 2008 The Hewlett-Packard Development Company 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 99 unchanged lines hidden (view full) --- 108 109// The python library is totally messed up with respect to constness, 110// so make a simple macro to make life a little easier 111#define PyCC(x) (const_cast<char *>(x)) 112 113EmbeddedPython *EmbeddedPython::importer = NULL; 114PyObject *EmbeddedPython::importerModule = NULL; 115EmbeddedPython::EmbeddedPython(const char *filename, const char *abspath, | 1/* 2 * Copyright (c) 2000-2005 The Regents of The University of Michigan 3 * Copyright (c) 2008 The Hewlett-Packard Development Company 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 99 unchanged lines hidden (view full) --- 108 109// The python library is totally messed up with respect to constness, 110// so make a simple macro to make life a little easier 111#define PyCC(x) (const_cast<char *>(x)) 112 113EmbeddedPython *EmbeddedPython::importer = NULL; 114PyObject *EmbeddedPython::importerModule = NULL; 115EmbeddedPython::EmbeddedPython(const char *filename, const char *abspath, |
116 const char *modpath, const char *code, int zlen, int len) | 116 const char *modpath, const unsigned char *code, int zlen, int len) |
117 : filename(filename), abspath(abspath), modpath(modpath), code(code), 118 zlen(zlen), len(len) 119{ 120 // if we've added the importer keep track of it because we need it 121 // to bootstrap. 122 if (string(modpath) == string("importer")) 123 importer = this; 124 else --- 150 unchanged lines hidden --- | 117 : filename(filename), abspath(abspath), modpath(modpath), code(code), 118 zlen(zlen), len(len) 119{ 120 // if we've added the importer keep track of it because we need it 121 // to bootstrap. 122 if (string(modpath) == string("importer")) 123 importer = this; 124 else --- 150 unchanged lines hidden --- |