[pure-lang-svn] SF.net SVN: pure-lang:[498] pure/trunk/interpreter.cc
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-08-14 21:31:25
|
Revision: 498 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=498&view=rev Author: agraef Date: 2008-08-14 21:31:33 +0000 (Thu, 14 Aug 2008) Log Message: ----------- For compatibility with the other C interface integer types, do sign extension also for char return values (use ubyte from the prelude to convert back to an unsigned quantity if desired). Modified Paths: -------------- pure/trunk/interpreter.cc Modified: pure/trunk/interpreter.cc =================================================================== --- pure/trunk/interpreter.cc 2008-08-14 13:56:45 UTC (rev 497) +++ pure/trunk/interpreter.cc 2008-08-14 21:31:33 UTC (rev 498) @@ -2985,9 +2985,8 @@ u = b.CreateCall(module->getFunction("pure_int"), b.CreateZExt(u, Type::Int32Ty)); else if (type == Type::Int8Ty) - // char treated as an unsigned integer here u = b.CreateCall(module->getFunction("pure_int"), - b.CreateZExt(u, Type::Int32Ty)); + b.CreateSExt(u, Type::Int32Ty)); else if (type == Type::Int16Ty) u = b.CreateCall(module->getFunction("pure_int"), b.CreateSExt(u, Type::Int32Ty)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |