Tell us your DIP1000 woes
Timon Gehr
timon.gehr at gmx.ch
Sun Aug 25 20:02:01 UTC 2024
On 8/25/24 19:02, Steven Schveighoffer wrote:
>
> I don't have time to play around with dip1000 normally -- it generally
> just results in bizarre and unfixable errors.
>
> https://github.com/mysql-d/mysql-native/pull/283
diff --git a/source/mysql/protocol/comms.d b/source/mysql/protocol/comms.d
index ec2a3ea..0238926 100644
--- a/source/mysql/protocol/comms.d
+++ b/source/mysql/protocol/comms.d
@@ -689,7 +689,7 @@ package(mysql) ubyte[] getPacket(Connection conn)
return packet;
}
-package(mysql) void send(MySQLSocket _socket, const(ubyte)[] packet)
+package(mysql) void send(MySQLSocket _socket, scope const(ubyte)[] packet)
in
{
assert(packet.length > 4); // at least 1 byte more than header
diff --git a/source/mysql/protocol/sockets.d
b/source/mysql/protocol/sockets.d
index a582fc9..7da43d7 100644
--- a/source/mysql/protocol/sockets.d
+++ b/source/mysql/protocol/sockets.d
@@ -39,7 +39,7 @@ interface MySQLSocket
@safe:
void close();
@property bool connected() const;
- void read(ubyte[] dst);
+ void read(scope ubyte[] dst);
void write(const scope ubyte[] bytes);
void acquire();
@@ -78,7 +78,7 @@ class MySQLSocketPhobos : MySQLSocket
return socket.isAlive;
}
- void read(ubyte[] dst)
+ void read(scope ubyte[] dst)
{
// Note: I'm a little uncomfortable with this line as it doesn't
// (and can't) update Connection._open. Not sure what can be done,
More information about the Digitalmars-d
mailing list