Ignore:
Timestamp:
Nov 24, 2011, 6:51:34 PM (14 years ago)
Author:
dmik
Message:

Use alloca() instead of _alloca().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/include/heapstring.h

    r21720 r21815  
    8888  {                                                                      \
    8989    int len = MultiByteToWideChar( CP_ACP, 0, strA, -1, NULL, 0);        \
    90     strW = (LPWSTR)_alloca( len*sizeof(WCHAR) );                         \
     90    strW = (LPWSTR)alloca( len*sizeof(WCHAR) );                          \
    9191    MultiByteToWideChar(CP_ACP, 0, strA, -1, strW, len);                 \
    9292  }
     
    9797  {                                                                      \
    9898      int len = WideCharToMultiByte( CP_ACP, 0, strW, -1, NULL, 0, 0, NULL);\
    99       strA = (LPSTR)_alloca(len);                                        \
     99      strA = (LPSTR)alloca(len);                                         \
    100100      WideCharToMultiByte(CP_ACP, 0, strW, -1, strA, len, 0, NULL );     \
    101101  }
     
    104104  {                                                                      \
    105105    int iLength = lstrlenA(strSrc) + 1;                                  \
    106     strDest = (LPSTR)_alloca( iLength );                                 \
     106    strDest = (LPSTR)alloca( iLength );                                  \
    107107    memcpy( strDest, strSrc, iLength);                                   \
    108108  }
     
    111111  {                                                                      \
    112112    int iLength = lstrlenW(strSrc) + 1;                                  \
    113     strDest = (LPWSTR)_alloca( iLength * sizeof(WCHAR) );                \
     113    strDest = (LPWSTR)alloca( iLength * sizeof(WCHAR) );                 \
    114114    memcpy( strDest, strSrc, iLength * sizeof(WCHAR) );                  \
    115115  }
Note: See TracChangeset for help on using the changeset viewer.