diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-16 20:47:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-16 20:47:57 +0400 |
commit | f2a0062042edfafab2c0d9472f2669521ff70930 (patch) | |
tree | 661259338dadb701f6567d627061e81be41b35e5 /source/blender/python/generic | |
parent | a6e290166b7565d5e70309d8e41fbc267321b551 (diff) |
Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a))
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/py_capi_utils.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index c0004789faa..54e27a30791 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -606,8 +606,7 @@ void PyC_SetHomePath(const char *py_path_bundle) /* cant use this, on linux gives bug: #23018, TODO: try LANG="en_US.UTF-8" /usr/bin/blender, suggested 22008 */ /* mbstowcs(py_path_bundle_wchar, py_path_bundle, FILE_MAXDIR); */ - BLI_strncpy_wchar_from_utf8(py_path_bundle_wchar, py_path_bundle, - sizeof(py_path_bundle_wchar) / sizeof(wchar_t)); + BLI_strncpy_wchar_from_utf8(py_path_bundle_wchar, py_path_bundle, ARRAY_SIZE(py_path_bundle_wchar)); Py_SetPythonHome(py_path_bundle_wchar); // printf("found python (wchar_t) '%ls'\n", py_path_bundle_wchar); |