From: Tim H. <har...@ya...> - 2011-01-17 23:53:37
|
Hi all, I have a C++ method defined as such: void RPCcall( uint64_t, void*, uint64_t, void*, uint64_t* ); After compiling, the method in Java looks like such: public void RPCcall(SWIGTYPE_p_uint64_t arg0, SWIGTYPE_p_void arg1, SWIGTYPE_p_uint64_t arg2, SWIGTYPE_p_void arg3, SWIGTYPE_p_uint64_t arg4) { Question 1: Why does the original C++ method that has a uint64_t get converted to a SWIGTYPE that requires a pointer (isn't that what the p in SWIGTYPE_p_uint64_t stands for?) for the first parameter. Note that arg4 requires a pointer to uint64_t and arg0 and arg2 should be pass by value, yet the same SWIGTYPE_p_uint64_t is being used for all three. Question 2: What is best practice to work with these uint64_t C++ types in the java interface? I read some stuff about loss of precision and using java long and etc. Thanks, Tim |