From 54289302bc821e69ff7b8079fb412dcd410d9b65 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Mon, 26 Oct 2015 20:10:24 +0100 Subject: [PATCH] minor cleanups --- include/pybind11/pybind11.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 47e99b9c..b8c97310 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -32,7 +32,7 @@ template struct arg_t; /// Annotation for keyword arguments struct arg { arg(const char *name) : name(name) { } - template inline arg_t operator=(const T &value); + template arg_t operator=(const T &value); const char *name; }; @@ -41,13 +41,10 @@ template struct arg_t : public arg { arg_t(const char *name, const T &value) : arg(name), value(value) { } T value; }; -template inline arg_t arg::operator=(const T &value) { return arg_t(name, value); } +template arg_t arg::operator=(const T &value) { return arg_t(name, value); } /// Annotation for methods -struct is_method { - PyObject *class_; - is_method(object *o) : class_(o->ptr()) { } -}; +struct is_method { PyObject *class_; is_method(object *o) : class_(o->ptr()) { } }; /// Annotation for documentation struct doc { const char *value; doc(const char *value) : value(value) { } }; @@ -67,9 +64,9 @@ private: PyObject * (*impl) (function_entry *, PyObject *, PyObject *, PyObject *) = nullptr; PyMethodDef *def = nullptr; void *data = nullptr; + void (*free) (void *ptr) = nullptr; bool is_constructor = false, is_method = false; short keywords = 0; - void (*free) (void *ptr) = nullptr; return_value_policy policy = return_value_policy::automatic; std::string signature; PyObject *class_ = nullptr;