Skip to content

Commit ed6b2c5

Browse files
committed
avoid collision with windows define
1 parent 10f0c0e commit ed6b2c5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/duckdb_py/include/duckdb_python/pytype.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DuckDBPyType : public enable_shared_from_this<DuckDBPyType> {
3030

3131
public:
3232
bool Equals(const shared_ptr<DuckDBPyType> &other) const;
33-
ssize_t Hash() const;
33+
ssize_t HashType() const;
3434
bool EqualsString(const string &type_str) const;
3535
shared_ptr<DuckDBPyType> GetAttribute(const string &name) const;
3636
py::list Children() const;

src/duckdb_py/typing/pytype.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ bool DuckDBPyType::Equals(const shared_ptr<DuckDBPyType> &other) const {
4646
return type == other->type;
4747
}
4848

49-
ssize_t DuckDBPyType::Hash() const {
49+
ssize_t DuckDBPyType::HashType() const {
5050
return py::hash(py::str(ToString()));
5151
}
5252

@@ -334,7 +334,7 @@ void DuckDBPyType::Initialize(py::handle &m) {
334334
py::is_operator());
335335
type_module.def("__eq__", &DuckDBPyType::EqualsString, "Compare two types for equality", py::arg("other"),
336336
py::is_operator());
337-
type_module.def("__hash__", &DuckDBPyType::Hash, "Hashes the type, equal to stringifying+hashing");
337+
type_module.def("__hash__", &DuckDBPyType::HashType, "Hashes the type, equal to stringifying+hashing");
338338
type_module.def_property_readonly("id", &DuckDBPyType::GetId);
339339
type_module.def_property_readonly("children", &DuckDBPyType::Children);
340340
type_module.def(py::init<>([](const string &type_str, shared_ptr<DuckDBPyConnection> connection = nullptr) {

0 commit comments

Comments
 (0)