aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-01-29 22:06:58 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-01-29 22:06:58 -0800
commit3b8a4e56b0af8461f0f2f4c9469aba0e5a7536ba (patch)
tree6c8421d0c496d9e22fbfc2da07a0d22d50800373 /common.cpp
parent966cd6a8ca5f4fa2257f8baa9ccc5a173762658b (diff)
A bunch of work to move towards a sane memory model in job_t
Diffstat (limited to 'common.cpp')
-rw-r--r--common.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common.cpp b/common.cpp
index c5974d3e..17e7348b 100644
--- a/common.cpp
+++ b/common.cpp
@@ -159,14 +159,14 @@ wchar_t **list_to_char_arr( array_list_t *l )
wchar_t **completions_to_char_arr( std::vector<completion_t> &l )
{
wchar_t ** res = (wchar_t **)malloc( sizeof(wchar_t *)*( l.size() + 1) );
- int i;
+ size_t i;
if( res == 0 )
{
DIE_MEM();
}
for( i=0; i< l.size(); i++ )
{
- res[i] = const_cast<wchar_t*>(l.at(i).completion.c_str());
+ res[i] = wcsdup(l.at(i).completion.c_str());
}
res[i]='\0';
return res;
@@ -414,7 +414,7 @@ char *wcs2str_internal( const wchar_t *in, char *out )
return out;
}
-char **wcsv2strv( const wchar_t **in )
+char **wcsv2strv( const wchar_t * const *in )
{
int count =0;
int i;