1
0
mirror of https://github.com/pybind/pybind11.git synced 2024-12-04 19:07:11 +00:00

Fixing compiler errors

This commit is contained in:
Tom de Geus 2022-02-26 16:50:55 +01:00
parent ae3cfa82cc
commit 726918d74a
No known key found for this signature in database
GPG Key ID: C408E6AA1BBB61A1

View File

@ -1258,14 +1258,14 @@ public:
const char *name = PyModule_GetName(*this);
size_t n = strlen(name);
if (n == 0) {
return this->make_alias(name);
return make_alias(name);
}
if (name[0] != "_") {
return this->make_alias(name);
if (strcmp(name[0], "_") != 0) {
return make_alias(name);
}
char alias[n - 1];
std::copy(&name[1], &name[n - 1], &alias[0]);
return this->make_alias(alias);
return make_alias(alias);
}
};