SungchulCho / v8-juice

Automatically exported from code.google.com/p/v8-juice
Other
0 stars 0 forks source link

NativeToJS/JSToNative specializations for ulong missing on some platforms #17

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Reminder to self and note of potential future historic interest:

unsigned long and uint64_t are not the same type on some platforms (e.g.
gcc+Linux 32bit), thus the normal uint64_t specialization for to/from JS
conversions does not apply to ulong on those platforms. This leads to ulong
wanting to convert as (ulong *) due to the default cast specializations.
This breaks forwarding to/from native functions which use ulong
parameter/return types.

The fix for this involves adding to/from JS specializations for ulong, but
only on platforms for which ulong is not the same as one of the uintNN_t types.

This is fixed on my hard drive at home but it requires some metatemplate
code which in turn causes convert.h to no longer be standalone code (it
currently has no deps aside from STL and v8). Once i'm emotionally over the
need for that dependency, i'll get this committed.

Original issue reported on code.google.com by sgbeal@googlemail.com on 30 Oct 2009 at 12:46

GoogleCodeExporter commented 8 years ago
Fix committed in r970. Now we just need to know if it works on 64-bit platforms.

Original comment by sgbeal@googlemail.com on 2 Nov 2009 at 4:14