Skip to content

Commit bc63aff

Browse files
committed
Version id "Have_vibe_d_core" -> "Have_vibe_core"
1 parent 8c472ef commit bc63aff

File tree

6 files changed

+24
-23
lines changed

6 files changed

+24
-23
lines changed

source/app.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Usage: app [connection string]
44
If connection string isn't provided, the following default connection string will be used:
55
host=localhost;port=3306;user=testuser;pwd=testpassword;db=testdb
66
7-
(optional) -version=Have_vibe_d_core:
7+
(optional) -version=Have_vibe_core:
88
Link with Vibe.d, and run test using use Vibe.d sockets instead of Phobos sockets.
99
1010
(optional) -version=UseConnPool:
11-
Run test using use Vibe.d conenction pool. Requires -version=Have_vibe_d_core
11+
Run test using use Vibe.d conenction pool. Requires -version=Have_vibe_core
1212
+/
1313

1414
import mysql;

source/mysql/connection.d

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ debug(MYSQLN_TESTS)
2222
import mysql.test.common;
2323
}
2424

25-
version(Have_vibe_d_core)
25+
version(Have_vibe_core)
2626
{
2727
static if(__traits(compiles, (){ import vibe.core.net; } ))
2828
import vibe.core.net;
@@ -430,7 +430,7 @@ package:
430430
void bumpPacket() { _cpn++; }
431431
void resetPacket() { _cpn = 0; }
432432

433-
version(Have_vibe_d_core) {} else
433+
version(Have_vibe_core) {} else
434434
pure const nothrow invariant()
435435
{
436436
assert(_socketType != MySQLSocketType.vibed);
@@ -445,7 +445,7 @@ package:
445445

446446
static PlainVibeDSocket defaultOpenSocketVibeD(string host, ushort port)
447447
{
448-
version(Have_vibe_d_core)
448+
version(Have_vibe_core)
449449
return vibe.core.net.connectTCP(host, port);
450450
else
451451
assert(0);
@@ -463,10 +463,10 @@ package:
463463
break;
464464

465465
case MySQLSocketType.vibed:
466-
version(Have_vibe_d_core) {
466+
version(Have_vibe_core) {
467467
_socket = new MySQLSocketVibeD(_openSocketVibeD(_host, _port));
468468
break;
469-
} else assert(0, "Unsupported socket type. Need version Have_vibe_d_core.");
469+
} else assert(0, "Unsupported socket type. Need version Have_vibe_core.");
470470
}
471471
}
472472

@@ -592,7 +592,7 @@ public:
592592
cs = A connection string of the form "host=localhost;user=user;pwd=password;db=mysqld"
593593
(TODO: The connection string needs work to allow for semicolons in its parts!)
594594
socketType = Whether to use a Phobos or Vibe.d socket. Default is Phobos,
595-
unless compiled with `-version=Have_vibe_d_core` (set automatically
595+
unless compiled with `-version=Have_vibe_core` (set automatically
596596
if using $(LINK2 http://code.dlang.org/getting_started, DUB)).
597597
openSocket = Optional callback which should return a newly-opened Phobos
598598
or Vibe.d TCP socket. This allows custom sockets to be used,
@@ -607,7 +607,7 @@ public:
607607
//client preferences can be set, and authentication can then be attempted.
608608
this(string host, string user, string pwd, string db, ushort port = 3306, SvrCapFlags capFlags = defaultClientFlags)
609609
{
610-
version(Have_vibe_d_core)
610+
version(Have_vibe_core)
611611
enum defaultSocketType = MySQLSocketType.vibed;
612612
else
613613
enum defaultSocketType = MySQLSocketType.phobos;
@@ -618,8 +618,8 @@ public:
618618
///ditto
619619
this(MySQLSocketType socketType, string host, string user, string pwd, string db, ushort port = 3306, SvrCapFlags capFlags = defaultClientFlags)
620620
{
621-
version(Have_vibe_d_core) {} else
622-
enforce!MYX(socketType != MySQLSocketType.vibed, "Cannot use Vibe.d sockets without -version=Have_vibe_d_core");
621+
version(Have_vibe_core) {} else
622+
enforce!MYX(socketType != MySQLSocketType.vibed, "Cannot use Vibe.d sockets without -version=Have_vibe_core");
623623

624624
this(socketType, &defaultOpenSocketPhobos, &defaultOpenSocketVibeD,
625625
host, user, pwd, db, port, capFlags);
@@ -632,7 +632,7 @@ public:
632632
this(MySQLSocketType.phobos, openSocket, null, host, user, pwd, db, port, capFlags);
633633
}
634634

635-
version(Have_vibe_d_core)
635+
version(Have_vibe_core)
636636
///ditto
637637
this(OpenSocketCallbackVibeD openSocket,
638638
string host, string user, string pwd, string db, ushort port = 3306, SvrCapFlags capFlags = defaultClientFlags)
@@ -656,8 +656,8 @@ public:
656656
{
657657
enforce!MYX(capFlags & SvrCapFlags.PROTOCOL41, "This client only supports protocol v4.1");
658658
enforce!MYX(capFlags & SvrCapFlags.SECURE_CONNECTION, "This client only supports protocol v4.1 connection");
659-
version(Have_vibe_d_core) {} else
660-
enforce!MYX(socketType != MySQLSocketType.vibed, "Cannot use Vibe.d sockets without -version=Have_vibe_d_core");
659+
version(Have_vibe_core) {} else
660+
enforce!MYX(socketType != MySQLSocketType.vibed, "Cannot use Vibe.d sockets without -version=Have_vibe_core");
661661

662662
_socketType = socketType;
663663
_host = host;
@@ -695,7 +695,7 @@ public:
695695
this(openSocket, a[0], a[1], a[2], a[3], to!ushort(a[4]), capFlags);
696696
}
697697

698-
version(Have_vibe_d_core)
698+
version(Have_vibe_core)
699699
///ditto
700700
this(OpenSocketCallbackVibeD openSocket, string cs, SvrCapFlags capFlags = defaultClientFlags)
701701
{

source/mysql/pool.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ debug(MYSQLN_TESTS)
2121
import mysql.test.common;
2222
}
2323

24-
version(Have_vibe_d_core) version = IncludeMySQLPool;
25-
version(MySQLDocs) version = IncludeMySQLPool;
24+
version(Have_vibe_core) version = IncludeMySQLPool;
25+
version(MySQLDocs) version = IncludeMySQLPool;
2626

2727
version(IncludeMySQLPool)
2828
{
29-
version(Have_vibe_d_core)
29+
version(Have_vibe_core)
3030
import vibe.core.connectionpool;
3131
else version(MySQLDocs)
3232
{

source/mysql/protocol/sockets.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import std.socket;
66

77
import mysql.exceptions;
88

9-
version(Have_vibe_d_core)
9+
version(Have_vibe_core)
1010
{
1111
static if(__traits(compiles, (){ import vibe.core.net; } ))
1212
import vibe.core.net;
@@ -16,7 +16,7 @@ version(Have_vibe_d_core)
1616

1717
/// Phobos/Vibe.d type aliases
1818
alias PlainPhobosSocket = std.socket.TcpSocket;
19-
version(Have_vibe_d_core)
19+
version(Have_vibe_core)
2020
{
2121
static import vibe.core.net;
2222
alias PlainVibeDSocket = vibe.core.net.TCPConnection; ///ditto
@@ -102,7 +102,7 @@ class MySQLSocketPhobos : MySQLSocket
102102
bool amOwner() { return true; }
103103
}
104104

105-
version(Have_vibe_d_core) {
105+
version(Have_vibe_core) {
106106
/// Wraps a Vibe.d socket with the common interface
107107
class MySQLSocketVibeD : MySQLSocket
108108
{

source/mysql/test/integration.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,8 +1166,9 @@ unittest
11661166
// Test example.d
11671167
// Note: This always tests example.d using Vibe sockets, regardless of
11681168
// what kind of sockets the unittests are using. Once DUB Issue #1089
1169-
// is fixed, this will always test example.d using Phobos sockets.
1169+
// is fixed, this should be changed to always test example.d using Phobos sockets.
11701170
@("example")
1171+
version(Have_vibe_core)
11711172
debug(MYSQLN_TESTS)
11721173
unittest
11731174
{

source/mysql/test/regression.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ still using it.
290290
So, this test ensures lockConnection doesn't return a connection that's already in use.
291291
+/
292292
@("issue170")
293-
version(Have_vibe_d_core)
293+
version(Have_vibe_core)
294294
debug(MYSQLN_TESTS)
295295
unittest
296296
{

0 commit comments

Comments
 (0)