davidl
Joined: 17 Aug 2006 Posts: 27
|
Posted: Tue Jan 09, 2007 1:09 am Post subject: something weird in mango |
|
|
Index: icu/UConverter.d
===================================================================
--- icu/UConverter.d (revision 934)
+++ icu/UConverter.d (working copy)
@@ -447,8 +447,8 @@
void* dstLimit = dst + output.length;
ucnv_fromUnicode (handle, &dst, dstLimit, &src, srcLimit, null, flush, e);
- x.input = src - cast(wchar*) input;
- x.output = dst - cast(void*) output;
+ x.input = src - input.ptr;
+ x.output = dst - output.ptr;
if (e == e.BufferOverflow)
return true;
@@ -558,8 +558,8 @@
wchar* dstLimit = dst + output.length;
ucnv_toUnicode (handle, &dst, dstLimit, &src, srcLimit, null, flush, e);
- x.input = src - cast(void*) input;
- x.output = dst - cast(wchar*) output;
+ x.input = src - input.ptr;
+ x.output = dst - output.ptr;
if (e == e.BufferOverflow)
return true;
@@ -666,8 +666,8 @@
&src, srcLimit, null, null, null, null,
clear, flush, e);
clear = false;
- x.input = src - cast(void*) input;
- x.output = dst - cast(void*) output;
+ x.input = src - input.ptr;
+ x.output = dst - output.ptr;
if (e == e.BufferOverflow)
return true;
Index: io/Socket.d
===================================================================
--- io/Socket.d (revision 934)
+++ io/Socket.d (working copy)
@@ -1077,7 +1077,7 @@
protected bit isAlive()
{
int type, typesize = type.sizeof;
- return cast(bool) (getsockopt (sock, SOL_SOCKET, SO_TYPE, cast(char*) &type, &typesize) != SOCKET_ERROR);
+ return cast(bool) (getsockopt (sock, SOL_SOCKET, SO_TYPE, cast(char*)&type, &typesize) != SOCKET_ERROR);
}
@@ -2198,7 +2198,7 @@
uint* first()
{
- return cast(uint*)buf;
+ return buf.ptr;
}
}
i don't know if they are intended.
no returns
and inout param never get changed |
|