181 typedef unsigned char jubyte; |
181 typedef unsigned char jubyte; |
182 typedef unsigned short jushort; |
182 typedef unsigned short jushort; |
183 typedef unsigned int juint; |
183 typedef unsigned int juint; |
184 typedef unsigned long long julong; |
184 typedef unsigned long long julong; |
185 |
185 |
186 //---------------------------------------------------------------------------------------------------- |
|
187 // Special (possibly not-portable) casts |
|
188 // Cast floats into same-size integers and vice-versa w/o changing bit-pattern |
|
189 |
|
190 inline jint jint_cast (jfloat x) { return *(jint* )&x; } |
|
191 inline jlong jlong_cast (jdouble x) { return *(jlong* )&x; } |
|
192 |
|
193 inline jfloat jfloat_cast (jint x) { return *(jfloat* )&x; } |
|
194 inline jdouble jdouble_cast(jlong x) { return *(jdouble*)&x; } |
|
195 |
186 |
196 //---------------------------------------------------------------------------------------------------- |
187 //---------------------------------------------------------------------------------------------------- |
197 // Constant for jlong (specifying an long long constant is C++ compiler specific) |
188 // Constant for jlong (specifying an long long constant is C++ compiler specific) |
198 |
189 |
199 // Build a 64bit integer constant |
190 // Build a 64bit integer constant |