diff options
| author | Aiden Grossman <aidengrossman@google.com> | 2025-09-12 01:05:48 +0000 |
|---|---|---|
| committer | Aiden Grossman <aidengrossman@google.com> | 2025-09-12 01:05:48 +0000 |
| commit | 88a52e1fc6d3e153132f0e0a86431762adf8c0c4 (patch) | |
| tree | bae8c1b720736edc54705c325c5bfb95b459eda2 /mlir/lib/Bindings/Python/MainModule.cpp | |
| parent | 1873dd7e8bb03319500a9f4b51e9e498a8fb70de (diff) | |
| parent | 2740e4b73682eb7a6869c333991a608304938952 (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/boomanaiden154/main.clang-invoke-shell-script-with-bash
Created using spr 1.3.6
[skip ci]
Diffstat (limited to 'mlir/lib/Bindings/Python/MainModule.cpp')
| -rw-r--r-- | mlir/lib/Bindings/Python/MainModule.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mlir/lib/Bindings/Python/MainModule.cpp b/mlir/lib/Bindings/Python/MainModule.cpp index d7282b3d6f71..a14f09f77d2c 100644 --- a/mlir/lib/Bindings/Python/MainModule.cpp +++ b/mlir/lib/Bindings/Python/MainModule.cpp @@ -52,9 +52,14 @@ NB_MODULE(_mlir, m) { [](PyGlobals &self, bool enabled) { self.getTracebackLoc().setLocTracebacksEnabled(enabled); }) + .def("loc_tracebacks_frame_limit", + [](PyGlobals &self) { + return self.getTracebackLoc().locTracebackFramesLimit(); + }) .def("set_loc_tracebacks_frame_limit", - [](PyGlobals &self, int n) { - self.getTracebackLoc().setLocTracebackFramesLimit(n); + [](PyGlobals &self, std::optional<int> n) { + self.getTracebackLoc().setLocTracebackFramesLimit( + n.value_or(PyGlobals::TracebackLoc::kMaxFrames)); }) .def("register_traceback_file_inclusion", [](PyGlobals &self, const std::string &filename) { |
