several things: change object typedef to Object* instead of void* to improve type safety; add JNICALL attributes to JNI functions; implement additional JavaVM methods

This commit is contained in:
Joel Dice
2007-09-06 18:21:52 -06:00
parent a4b4f36c5b
commit bd4d9fdeb2
11 changed files with 690 additions and 219 deletions

View File

@ -33,8 +33,6 @@ inline void* operator new(size_t, void* p) throw() { return p; }
namespace vm {
typedef void* object;
const unsigned BytesPerWord = sizeof(uintptr_t);
const unsigned BitsPerWord = BytesPerWord * 8;
@ -118,7 +116,7 @@ indexOf(unsigned word, unsigned bit)
template <class T>
inline T&
cast(object p, unsigned offset)
cast(void* p, unsigned offset)
{
return *reinterpret_cast<T*>(static_cast<uint8_t*>(p) + offset);
}