Skip to content

Commit 690ea60

Browse files
Merge branch 'master' into 64bit
Conflicts: makefile
2 parents db58158 + 3d6b43a commit 690ea60

14 files changed

Lines changed: 181 additions & 353 deletions

File tree

juno/base/collections.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* License: See $(LINK2 ..\..\licence.txt, licence.txt) for use and distribution terms.
55
*/
66
module juno.base.collections;
7+
deprecated:
78

89
import juno.base.core,
910
juno.locale.core,

juno/base/core.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ struct Struct(T...) {
1717

1818
}
1919

20+
/**
21+
* $(MSDN system.idisposable, MSDN System.IDisposable)
22+
*/
2023
interface IDisposable {
2124

2225
void dispose();
2326

2427
}
2528

29+
/**
30+
* Calls dispose on obj on block() completion.
31+
*/
2632
void using(IDisposable obj, void delegate() block) {
2733
try {
2834
block();

juno/base/environment.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ final class Version {
202202
return 0;
203203
}
204204

205-
override typeof(super.opEquals(Object)) opEquals(Object other) {
205+
override bool opEquals(Object other) {
206206
auto v = cast(Version)other;
207207
if (v is null)
208208
return false;

juno/base/text.d

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -38,33 +38,33 @@ struct MIMECPINFO {
3838
uint dwFlags;
3939
uint uiCodePage;
4040
uint uiFamilyCodePage;
41-
wchar[64] wszDescription;
42-
wchar[50] wszWebCharset;
43-
wchar[50] wszHeaderCharset;
44-
wchar[50] wszBodyCharset;
45-
wchar[32] wszFixedWidthFont;
46-
wchar[32] wszProportionalFont;
41+
wchar wszDescription[64];
42+
wchar wszWebCharset[50];
43+
wchar wszHeaderCharset[50];
44+
wchar wszBodyCharset[50];
45+
wchar wszFixedWidthFont[32];
46+
wchar wszProportionalFont[32];
4747
ubyte bGDICharset;
4848
}
4949

5050
struct MIMECSETINFO {
5151
uint uiCodePage;
5252
uint uiInternetEncoding;
53-
wchar[50] wszCharset;
53+
wchar wszCharset[50];
5454
}
5555

5656
struct RFC1766INFO {
5757
uint lcid;
58-
wchar[6] wszRfc1766;
59-
wchar[32] wszLocaleName;
58+
wchar wszRfc1766[6];
59+
wchar wszLocaleName[32];
6060
}
6161

6262
struct SCRIPTINFO {
6363
ubyte ScriptId;
6464
uint uiCodePage;
65-
wchar[64] wszDescription;
66-
wchar[32] wszFixedWidthFont;
67-
wchar[32] wszProportionalFont;
65+
wchar wszDescription[64];
66+
wchar wszFixedWidthFont[32];
67+
wchar wszProportionalFont[32];
6868
}
6969

7070
struct DetectEncodingInfo {
@@ -290,28 +290,28 @@ private uint getCodePageFromName(string name) {
290290
*/
291291
abstract class Encoding {
292292

293-
private const uint CP_DEFAULT = 0;
294-
private const uint CP_ASCII = 20127;
295-
private const uint CP_UTF16 = 1200;
296-
private const uint CP_UTF16BE = 1201;
297-
private const uint CP_UTF32 = 12000;
298-
private const uint CP_UTF32BE = 12001;
299-
private const uint CP_WINDOWS_1252 = 1252;
300-
private const uint ISO_8859_1 = 28591;
301-
302-
private const uint ISO_SIMPLIFIED_CN = 50227;
303-
private const uint GB18030 = 54936;
304-
private const uint ISO_8859_8I = 38598;
305-
private const uint ISCII_DEVANAGARI = 57002;
306-
private const uint ISCII_BENGALI = 57003;
307-
private const uint ISCII_TAMIL = 57004;
308-
private const uint ISCII_TELUGU = 57005;
309-
private const uint ISCII_ASSEMESE = 57006;
310-
private const uint ISCII_ORIYA = 57007;
311-
private const uint ISCII_KANNADA = 57008;
312-
private const uint ISCII_MALAYALAM = 57009;
313-
private const uint ISCII_GUJARATHI = 57010;
314-
private const uint ISCII_PUNJABI = 507011;
293+
private static const uint CP_DEFAULT = 0;
294+
private static const uint CP_ASCII = 20127;
295+
private static const uint CP_UTF16 = 1200;
296+
private static const uint CP_UTF16BE = 1201;
297+
private static const uint CP_UTF32 = 12000;
298+
private static const uint CP_UTF32BE = 12001;
299+
private static const uint CP_WINDOWS_1252 = 1252;
300+
private static const uint ISO_8859_1 = 28591;
301+
302+
private static const uint ISO_SIMPLIFIED_CN = 50227;
303+
private static const uint GB18030 = 54936;
304+
private static const uint ISO_8859_8I = 38598;
305+
private static const uint ISCII_DEVANAGARI = 57002;
306+
private static const uint ISCII_BENGALI = 57003;
307+
private static const uint ISCII_TAMIL = 57004;
308+
private static const uint ISCII_TELUGU = 57005;
309+
private static const uint ISCII_ASSEMESE = 57006;
310+
private static const uint ISCII_ORIYA = 57007;
311+
private static const uint ISCII_KANNADA = 57008;
312+
private static const uint ISCII_MALAYALAM = 57009;
313+
private static const uint ISCII_GUJARATHI = 57010;
314+
private static const uint ISCII_PUNJABI = 507011;
315315

316316
private static Encoding[uint] encodings_;
317317
private static Encoding defaultEncoding_;

juno/com/core.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3753,7 +3753,7 @@ R invokeMethod(R = VARIANT)(IDispatch target, string name, ...) {
37533753
*
37543754
* // Invoke the Documents property
37553755
* // wordApp.Document
3756-
* IDispatch documents = getProperty!(IDispatch)(target, "Documents");
3756+
* IDispatch documents = getProperty!(IDispatch)(wordApp, "Documents");
37573757
*
37583758
* // Invoke the Count property on the Documents object
37593759
* // documents.Count

juno/locale/time.d

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,12 +1001,12 @@ enum DateTimeKind {
10011001
*/
10021002
struct DateTime {
10031003

1004-
private const ulong KindUnspecified = 0x0000000000000000;
1005-
private const ulong KindUtc = 0x4000000000000000;
1006-
private const ulong KindLocal = 0x8000000000000000;
1007-
private const ulong KindMask = 0xC000000000000000;
1008-
private const ulong TicksMask = 0x3FFFFFFFFFFFFFFF;
1009-
private const int KindShift = 0x3E;
1004+
private static const ulong KindUnspecified = 0x0000000000000000;
1005+
private static const ulong KindUtc = 0x4000000000000000;
1006+
private static const ulong KindLocal = 0x8000000000000000;
1007+
private static const ulong KindMask = 0xC000000000000000;
1008+
private static const ulong TicksMask = 0x3FFFFFFFFFFFFFFF;
1009+
private static const int KindShift = 0x3E;
10101010

10111011
/// Represents the smallest possible DateTime value.
10121012
static DateTime min = { 0 };

juno/macro.ddoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Macros:
2+
MSDN = $(LINK2 http://msdn.microsoft.com/en-us/library/$1.aspx, $+)
3+

juno/media/core.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Provides access to basic GDI+ graphics functionality.
33
*
4-
* For detailed information, refer to MSDN's documentation for the $(LINK2 http://msdn2.microsoft.com/en-us/library/system.drawing.aspx, System.Drawing) namespace.
4+
* For detailed information, refer to MSDN's documentation for the $(MSDN system.drawing, System.Drawing) namespace.
55
*
66
* Copyright: (c) 2009 John Chapman
77
*

juno/net/core.d

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ class Uri {
9494
int defaultPort;
9595
}
9696

97-
const string uriSchemeHttp = "http"; /// Specifies that the URI is accessed through HTTP.
98-
const string uriSchemeHttps = "https"; /// Specifies that the URI is accessed through HTTPS.
99-
const string uriSchemeFtp = "ftp"; /// Specifies that the URI is accessed through FTP.
100-
const string uriSchemeFile = "file"; /// Specifies that the URI is a pointer to a file.
101-
const string uriSchemeNews = "news"; /// Specifies that the URI is a news groups and is accessed through NNTP.
102-
const string uriSchemeMailTo = "mailto"; /// Specifies that the URI is an e-mail address and is accessed through SMTP.
103-
const string schemeDelimiter = "://";
97+
const static string uriSchemeHttp = "http"; /// Specifies that the URI is accessed through HTTP.
98+
const static string uriSchemeHttps = "https"; /// Specifies that the URI is accessed through HTTPS.
99+
const static string uriSchemeFtp = "ftp"; /// Specifies that the URI is accessed through FTP.
100+
const static string uriSchemeFile = "file"; /// Specifies that the URI is a pointer to a file.
101+
const static string uriSchemeNews = "news"; /// Specifies that the URI is a news groups and is accessed through NNTP.
102+
const static string uriSchemeMailTo = "mailto"; /// Specifies that the URI is an e-mail address and is accessed through SMTP.
103+
const static string schemeDelimiter = "://";
104104

105105
private const UriScheme httpScheme = { uriSchemeHttp, 80 };
106106
private const UriScheme httpsScheme = { uriSchemeHttps, 443 };
@@ -152,8 +152,8 @@ class Uri {
152152
}
153153

154154
/// ditto
155-
override typeof(super.opEquals(Object)) opEquals(Object obj) {
156-
return cast(typeof(super.opEquals(Object)))equals(obj);
155+
override bool opEquals(Object obj) {
156+
return equals(obj);
157157
}
158158

159159
/**
@@ -593,7 +593,7 @@ private class CredentialKey {
593593
return std.string.icmp(uriPrefix.absolutePath, uri.absolutePath) == 0;
594594
}
595595

596-
override typeof(super.opEquals(Object)) opEquals(Object obj) {
596+
override bool opEquals(Object obj) {
597597
if (auto other = cast(CredentialKey)obj)
598598
return (std.string.icmp(authType, other.authType) == 0 && uriPrefix.equals(other.uriPrefix));
599599
return false;
@@ -627,7 +627,7 @@ private class CredentialHostKey {
627627
return true;
628628
}
629629

630-
override typeof(super.opEquals(Object)) opEquals(Object obj) {
630+
override bool opEquals(Object obj) {
631631
if (auto other = cast(CredentialHostKey)obj)
632632
return (std.string.icmp(host, other.host) == 0 && std.string.icmp(authType, other.authType) == 0 && port == other.port);
633633
return false;
@@ -1292,7 +1292,7 @@ class IPAddress {
12921292
return false;
12931293
}
12941294

1295-
override typeof(super.opEquals(Object)) opEquals(Object obj) {
1295+
override bool opEquals(Object obj) {
12961296
return this.equals(obj);
12971297
}
12981298

@@ -1558,8 +1558,8 @@ class PingReply {
15581558
*/
15591559
class Ping : IDisposable {
15601560

1561-
private const uint DEFAULT_TIMEOUT = 5000;
1562-
private const uint DEFAULT_BUFFER_SIZE = 32;
1561+
private static const uint DEFAULT_TIMEOUT = 5000;
1562+
private static const uint DEFAULT_BUFFER_SIZE = 32;
15631563

15641564
private Handle pingHandleV4_;
15651565
private Handle pingHandleV6_;

0 commit comments

Comments
 (0)