some inline functions are motified,clang and gcc4.6 can now be used