1. 15 Sep, 2020 1 commit
    • Yannick Jadoul's avatar
      Resolve empty statement warning when using PYBIND11_OVERLOAD_PURE_NAME and... · d65e34d6
      Yannick Jadoul authored
      Resolve empty statement warning when using PYBIND11_OVERLOAD_PURE_NAME and PYBIND11_OVERLOAD_PURE (#2325)
      
      * Wrap PYBIND11_OVERLOAD_NAME and PYBIND11_OVERLOAD_PURE_NAME in do { ... } while (false), and resolve trailing semicolon
      
      * Deprecate PYBIND11_OVERLOAD_* and get_overload in favor of PYBIND11_OVERRIDE_* and get_override
      
      * Correct erroneous usage of 'overload' instead of 'override' in the implementation and internals
      
      * Fix tests to use non-deprecated PYBIND11_OVERRIDE_* macros
      
      * Update docs to use override instead of overload where appropriate, and add warning about deprecated aliases
      
      * Add semicolons to deprecated PYBIND11_OVERLOAD macros to match original behavior
      
      * Remove deprecation of PYBIND11_OVERLOAD_* macros and get_overload
      
      * Add note to changelog and upgrade guide
      d65e34d6
  2. 10 Jun, 2019 1 commit
  3. 17 Jul, 2018 1 commit
  4. 25 Aug, 2017 1 commit
  5. 20 Aug, 2017 1 commit
  6. 29 May, 2017 1 commit
    • Dean Moldovan's avatar
      Replace PYBIND11_PLUGIN with PYBIND11_MODULE · 443ab594
      Dean Moldovan authored
      This commit also adds `doc()` to `object_api` as a shortcut for the
      `attr("__doc__")` accessor.
      
      The module macro changes from:
      ```c++
      PYBIND11_PLUGIN(example) {
          pybind11::module m("example", "pybind11 example plugin");
          m.def("add", [](int a, int b) { return a + b; });
          return m.ptr();
      }
      ```
      
      to:
      
      ```c++
      PYBIND11_MODULE(example, m) {
          m.doc() = "pybind11 example plugin";
          m.def("add", [](int a, int b) { return a + b; });
      }
      ```
      
      Using the old macro results in a deprecation warning. The warning
      actually points to the `pybind11_init` function (since attributes
      don't bind to macros), but the message should be quite clear:
      "PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE".
      443ab594
  7. 28 May, 2017 1 commit
  8. 31 Jan, 2017 1 commit
  9. 20 Oct, 2016 1 commit
  10. 08 Jul, 2016 2 commits
  11. 17 Jan, 2016 1 commit
    • Wenzel Jakob's avatar
      general cleanup of the codebase · 48548ea4
      Wenzel Jakob authored
      - new pybind11::base<> attribute to indicate a subclass relationship
      - unified infrastructure for parsing variadic arguments in class_ and cpp_function
      - use 'handle' and 'object' more consistently everywhere
      48548ea4
  12. 02 Jan, 2016 1 commit
    • Tomasz Miąsko's avatar
      Use object class to hold partially converted python objects. · ca77130b
      Tomasz Miąsko authored
      Using object class to hold converted object automatically deallocates
      object if an exception is thrown or scope is left before constructing
      complete Python object.
      
      Additionally added method object::release() that allows to release
      ownership of python object without decreasing its reference count.
      ca77130b
  13. 28 Dec, 2015 1 commit
  14. 26 Dec, 2015 1 commit
  15. 18 Oct, 2015 1 commit
  16. 15 Oct, 2015 1 commit
  17. 13 Oct, 2015 2 commits