BUG: make the string static, otherwise the contents are gone when we exit

the function (same fix as in VTK/CMake/)

Alex
This commit is contained in:
Alexander Neundorf 2007-09-18 15:13:22 -04:00
parent ee3d940d97
commit ec207513e4
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ extern \"C\" {
FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
FILE(APPEND ${_filenameTmp} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
FILE(APPEND ${_filenameTmp} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
FILE(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n")