From 9017c978cb14c1487671663de4291cdbc6426fd1 Mon Sep 17 00:00:00 2001 From: Andreas Krennmair Date: Wed, 12 Mar 2008 20:44:28 +0000 Subject: Andreas Krennmair: removed unportable alloca(). fixed Makefile. updated pt_BR translation. updated ChangeLog. --- src/xmlpullparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xmlpullparser.cpp') diff --git a/src/xmlpullparser.cpp b/src/xmlpullparser.cpp index c4e10102..6a90038f 100644 --- a/src/xmlpullparser.cpp +++ b/src/xmlpullparser.cpp @@ -435,7 +435,7 @@ std::string xmlpullparser::decode_entity(std::string s) { } else if (s.length() > 1 && s[0] == '#') { std::string result; unsigned int wc; - char * mbc = static_cast(alloca(MB_CUR_MAX)); + char mbc[MB_CUR_MAX]; mbc[0] = '\0'; if (s[1] == 'x') { s.erase(0,2); @@ -457,7 +457,7 @@ std::string xmlpullparser::decode_entity(std::string s) { } else { for (unsigned int i=0;entity_table[i].entity;++i) { if (s == entity_table[i].entity) { - char * mbc = static_cast(alloca(MB_CUR_MAX)); + char mbc[MB_CUR_MAX]; int pos = wctomb(mbc, entity_table[i].value); mbc[pos] = '\0'; return std::string(mbc); -- cgit v1.2.3