Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-26 08:07:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-26 08:07:38 +0400
commit6736576f6d576f9a06db14a76193c0c237e5cba1 (patch)
tree51bc0a37f1504dea826260340e80c085392d87aa /source/gameengine/Ketsji/KX_PythonInit.cpp
parentaf7288c407fbb4bb462f509d5782b660a29c4883 (diff)
replace FILE_MAXDIR + FILE_MAXFILE with FILE_MAX
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 02e6ebea71b..d9822d131eb 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -147,8 +147,8 @@ extern "C" {
#ifdef WITH_PYTHON
static RAS_ICanvas* gp_Canvas = NULL;
-static char gp_GamePythonPath[FILE_MAXDIR + FILE_MAXFILE] = "";
-static char gp_GamePythonPathOrig[FILE_MAXDIR + FILE_MAXFILE] = ""; // not super happy about this, but we need to remember the first loaded file for the global/dict load save
+static char gp_GamePythonPath[FILE_MAX] = "";
+static char gp_GamePythonPathOrig[FILE_MAX] = ""; // not super happy about this, but we need to remember the first loaded file for the global/dict load save
static SCA_PythonKeyboard* gp_PythonKeyboard = NULL;
static SCA_PythonMouse* gp_PythonMouse = NULL;
@@ -237,13 +237,13 @@ The function also converts the directory separator to the local file system form
static PyObject* gPyExpandPath(PyObject*, PyObject* args)
{
- char expanded[FILE_MAXDIR + FILE_MAXFILE];
+ char expanded[FILE_MAX];
char* filename;
if (!PyArg_ParseTuple(args,"s:ExpandPath",&filename))
return NULL;
- BLI_strncpy(expanded, filename, FILE_MAXDIR + FILE_MAXFILE);
+ BLI_strncpy(expanded, filename, FILE_MAX);
BLI_path_abs(expanded, gp_GamePythonPath);
return PyUnicode_DecodeFSDefault(expanded);
}
@@ -496,7 +496,7 @@ static PyObject* gPyGetBlendFileList(PyObject*, PyObject* args)
list = PyList_New(0);
if (searchpath) {
- BLI_strncpy(cpath, searchpath, FILE_MAXDIR + FILE_MAXFILE);
+ BLI_strncpy(cpath, searchpath, FILE_MAX);
BLI_path_abs(cpath, gp_GamePythonPath);
} else {
/* Get the dir only */
@@ -1728,7 +1728,7 @@ static void backupPySysObjects(void)
static void initPySysObjects__append(PyObject *sys_path, const char *filename)
{
PyObject *item;
- char expanded[FILE_MAXDIR + FILE_MAXFILE];
+ char expanded[FILE_MAX];
BLI_split_dir_part(filename, expanded, sizeof(expanded)); /* get the dir part of filename only */
BLI_path_abs(expanded, gp_GamePythonPath); /* filename from lib->filename is (always?) absolute, so this may not be needed but it wont hurt */