[llvm-commits] CVS: llvm-java/lib/ClassFile/ClassFile.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sat May 22 00:59:09 PDT 2004
Changes in directory llvm-java/lib/ClassFile:
ClassFile.cpp updated: 1.8 -> 1.9
---
Log message:
Make code be an array of uint8_t's instead of char's.
---
Diffs of the changes: (+2 -2)
Index: llvm-java/lib/ClassFile/ClassFile.cpp
diff -u llvm-java/lib/ClassFile/ClassFile.cpp:1.8 llvm-java/lib/ClassFile/ClassFile.cpp:1.9
--- llvm-java/lib/ClassFile/ClassFile.cpp:1.8 Thu May 20 19:05:59 2004
+++ llvm-java/lib/ClassFile/ClassFile.cpp Sat May 22 00:57:09 2004
@@ -537,8 +537,8 @@
maxStack_ = readU2(is);
maxLocals_ = readU2(is);
codeSize_ = readU4(is);
- code_ = new char[codeSize_];
- std::streamsize s = is.rdbuf()->sgetn(code_, codeSize_);
+ code_ = new uint8_t[codeSize_];
+ std::streamsize s = is.rdbuf()->sgetn(reinterpret_cast<char*>(code_), codeSize_);
if (s != (std::streamsize) codeSize_)
throw ClassFileParseError(
"Could not read code from input stream");
More information about the llvm-commits
mailing list