Lagrange
Loading...
Searching...
No Matches
bind_debug.h
1
/*
2
* Copyright 2026 Adobe. All rights reserved.
3
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License. You may obtain a copy
5
* of the License at http://www.apache.org/licenses/LICENSE-2.0
6
*
7
* Unless required by applicable law or agreed to in writing, software distributed under
8
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
* OF ANY KIND, either express or implied. See the License for the specific language
10
* governing permissions and limitations under the License.
11
*/
12
#pragma once
13
14
#include <lagrange/python/binding.h>
15
16
namespace
lagrange::python {
17
18
namespace
nb = nanobind;
19
20
void
bind_debug(nb::module_& m)
21
{
22
#ifdef NDEBUG
23
m.attr(
"_ndebug"
) =
true
;
24
#else
25
m.attr(
"_ndebug"
) =
false
;
26
#endif
27
}
28
29
}
// namespace lagrange::python
python
src
bind_debug.h
Generated on Wed Nov 4 2026 for Lagrange by
1.13.2