Browse thread
Re: Syntax for label
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | John Max Skaller <skaller@m...> |
| Subject: | Unsigned integers? |
I have some code for processing ISO-10646 characters and UTF-8, which uses caml integers. ISO-10646 has 2^31 code points, which can be covered by caml integers on a 32bit machine. Using an unboxed type is mandatory for performance. Unfortunately, caml integers are signed, which makes most of the code I have written wrong (I haven't taken the care to handle integers over 2^30 correctly). What is the best way to handle this problem? Would a (standard?) library module (written in C), that treats integers as unsigned be a reasonable solution? [This may require writing 'uint_add x y' instead of 'x+y', but that doesn't matter in the above mentioned application, since the integers are being used to represent characters] -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net