Skip to content

Commit 516e706

Browse files
committed
fix bindings
1 parent eebb590 commit 516e706

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

bindings/python/UtilBindings.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,14 @@ void registerUtil(py::module_& m) {
150150
.def("getFullyOriginalRange", &SourceManager::getFullyOriginalRange, "range"_a)
151151
.def("getFullyExpandedLoc", &SourceManager::getFullyExpandedLoc, "location"_a)
152152
.def("getSourceText", &SourceManager::getSourceText, "buffer"_a)
153-
.def("assignText",
154-
py::overload_cast<std::string_view, SourceLocation, const SourceLibrary*>(
155-
&SourceManager::assignText),
156-
"text"_a, "includedFrom"_a = SourceLocation(), "library"_a = nullptr)
153+
.def(
154+
"assignText",
155+
static_cast<SourceBuffer(SourceManager::*)(std::string_view, SourceLocation, const SourceLibrary*)>(
156+
&SourceManager::assignText),
157+
"text"_a, "includedFrom"_a = SourceLocation(), "library"_a = nullptr)
157158
.def("assignText",
158159
py::overload_cast<std::string_view, std::string_view, SourceLocation,
159-
const SourceLibrary*>(&SourceManager::assignText),
160+
const SourceLibrary*>(&SourceManager::assignText<false>),
160161
"path"_a, "text"_a, "includedFrom"_a = SourceLocation(), "library"_a = nullptr)
161162
.def(
162163
"readSource",

source/text/SourceManager.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -985,9 +985,4 @@ template SourceBuffer SourceManager::assignText<true>(std::string_view, std::str
985985
template SourceBuffer SourceManager::assignText<false>(std::string_view, std::string_view,
986986
SourceLocation, const SourceLibrary*);
987987

988-
template std::optional<SourceManager::FileData*> SourceManager::computeOffsets<
989-
std::shared_lock<std::shared_mutex>>(BufferID, std::shared_lock<std::shared_mutex>&) const;
990-
template std::optional<SourceManager::FileData*> SourceManager::computeOffsets<
991-
std::unique_lock<std::shared_mutex>>(BufferID, std::unique_lock<std::shared_mutex>&) const;
992-
993988
} // namespace slang

0 commit comments

Comments
 (0)