Skip to content

Commit e264fa4

Browse files
committed
Extract backend initialization to interpreter
1 parent 61fee34 commit e264fa4

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

interpreter.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,11 @@ struct _interpreter {
208208
}
209209
};
210210

211-
}} // end namespace matplotlibcpp::detail
211+
} // end namespace detail
212+
213+
// must be called before the first regular call to matplotlib to have any effect
214+
inline void backend(const std::string& name)
215+
{
216+
detail::s_backend = name;
217+
}
218+
} // end namespace matplotlibcpp

matplotlibcpp.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ PyObject* to_dict(const std::map<std::string, std::string>& some_dict)
3535

3636
} // end namespace helpers
3737

38-
// must be called before the first regular call to matplotlib to have any effect
39-
inline void backend(const std::string& name)
40-
{
41-
detail::s_backend = name;
42-
}
43-
4438
inline bool annotate(std::string annotation, double x, double y)
4539
{
4640
PyObject * xy = PyTuple_New(2);

0 commit comments

Comments
 (0)