We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdc9321 commit 094ebd2Copy full SHA for 094ebd2
ext/mysql2/client.c
@@ -893,15 +893,17 @@ static VALUE rb_mysql_client_server_info(VALUE self) {
893
*
894
* Return the file descriptor number for this client.
895
*/
896
-static VALUE rb_mysql_client_socket(VALUE self) {
897
#ifndef _WIN32
+static VALUE rb_mysql_client_socket(VALUE self) {
898
GET_CLIENT(self);
899
REQUIRE_CONNECTED(wrapper);
900
return INT2NUM(wrapper->client->net.fd);
901
+}
902
#else
903
+static VALUE rb_mysql_client_socket(RB_MYSQL_UNUSED VALUE self) {
904
rb_raise(cMysql2Error, "Raw access to the mysql file descriptor isn't supported on Windows");
-#endif
905
}
906
+#endif
907
908
/* call-seq:
909
* client.last_id
0 commit comments