init.cc (6227:a17798f2a52c) | init.cc (7502:3ef7ff12c788) |
---|---|
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 --- 140 unchanged lines hidden (view full) --- 149 } 150 151 // Load the rest of the embedded python files into the embedded 152 // python importer 153 const EmbeddedPyModule *pymod = &embeddedPyModules[0]; 154 while (pymod->filename) { 155 PyObject *code = getCode(pymod); 156 PyObject *result = PyObject_CallMethod(module, PyCC("add_module"), | 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 --- 140 unchanged lines hidden (view full) --- 149 } 150 151 // Load the rest of the embedded python files into the embedded 152 // python importer 153 const EmbeddedPyModule *pymod = &embeddedPyModules[0]; 154 while (pymod->filename) { 155 PyObject *code = getCode(pymod); 156 PyObject *result = PyObject_CallMethod(module, PyCC("add_module"), |
157 PyCC("ssO"), pymod->filename, pymod->modpath, code); | 157 PyCC("sssO"), pymod->filename, pymod->abspath, pymod->modpath, 158 code); |
158 if (!result) { 159 PyErr_Print(); 160 return 1; 161 } 162 Py_DECREF(result); 163 ++pymod; 164 } 165 --- 44 unchanged lines hidden --- | 159 if (!result) { 160 PyErr_Print(); 161 return 1; 162 } 163 Py_DECREF(result); 164 ++pymod; 165 } 166 --- 44 unchanged lines hidden --- |