diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-06-16 05:18:57 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-06-16 05:18:57 +0400 |
commit | ddec3db89d10ac84f1e2c3cdd7a2fcd5134b46f2 (patch) | |
tree | c97e11db3a2c57719d5c449cecd387bdc2fe00a4 /source/blender/python/api2_2x/Sys.c | |
parent | 23165676b7cfa91c6e4b4a2e4975b09623659e79 (diff) |
- New Blender.Draw method by Campbell Barton (Cam / ideasman):
PupStrInput, a wrapper for the Blender String popup (thanks!)
- Fixed bug #1374 reported by Gabriel Beloin (gabio, thanks too):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=1374&group_id=9
There was a minor mistake in the import menu: vrml called dxf and vice-versa and shortcuts were wrong (removed them).
- Doc updates, minor updates elsewhere.
Diffstat (limited to 'source/blender/python/api2_2x/Sys.c')
-rw-r--r-- | source/blender/python/api2_2x/Sys.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/python/api2_2x/Sys.c b/source/blender/python/api2_2x/Sys.c index b2c133d6881..a7356d39639 100644 --- a/source/blender/python/api2_2x/Sys.c +++ b/source/blender/python/api2_2x/Sys.c @@ -158,7 +158,7 @@ static PyObject *M_sys_basename (PyObject *self, PyObject *args) if (n > FILE_MAXFILE) return EXPP_ReturnPyObjError(PyExc_RuntimeError, "path too long"); - strncpy(basename, p+1, n); /* + 1 to skip the sep */ + BLI_strncpy(basename, p+1, n); /* + 1 to skip the sep */ basename[n] = '\0'; return Py_BuildValue("s", basename); } @@ -190,7 +190,7 @@ static PyObject *M_sys_dirname (PyObject *self, PyObject *args) if (n > FILE_MAXDIR) return EXPP_ReturnPyObjError (PyExc_RuntimeError, "path too long"); - strncpy(dirname, name, n); + BLI_strncpy(dirname, name, n); dirname[n] = '\0'; return Py_BuildValue("s", dirname); } @@ -233,9 +233,9 @@ static PyObject *M_sys_splitext (PyObject *self, PyObject *args) if (n > FILE_MAXFILE || (len - n ) > FILE_MAXFILE) EXPP_ReturnPyObjError(PyExc_RuntimeError, "path too long"); - strncpy(ext, dot, n); + BLI_strncpy(ext, dot, n); ext[n] = '\0'; - strncpy(path, name, dot - name); + BLI_strncpy(path, name, dot - name); path[dot - name] = '\0'; return Py_BuildValue("ss", path, ext); @@ -271,11 +271,11 @@ static PyObject *M_sys_makename(PyObject *self, PyObject *args, PyObject *kw) if (p && strip) { n = path + len - p - 1; /* - 1 because we don't want the sep */ - strncpy(basename, p+1, n); /* + 1 to skip the sep */ + BLI_strncpy(basename, p+1, n); /* + 1 to skip the sep */ basename[n] = 0; } else { - strncpy(basename, path, len); + BLI_strncpy(basename, path, len); n = len; basename[n] = '\0'; } @@ -291,7 +291,7 @@ static PyObject *M_sys_makename(PyObject *self, PyObject *args, PyObject *kw) if (dot) n = dot - basename; else n = strlen(basename); - strncpy(basename + n, ext, lenext); + BLI_strncpy(basename + n, ext, lenext); basename[n+lenext] = '\0'; } } |