1. 14 Nov, 2019 1 commit
  2. 30 Aug, 2017 1 commit
  3. 08 Jun, 2017 1 commit
  4. 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
  5. 19 Dec, 2016 1 commit
  6. 12 Dec, 2016 1 commit
    • Jason Rhinelander's avatar
      Adds automatic casting on assignment of non-pyobject types (#551) · 3f1ff3f4
      Jason Rhinelander authored
      This adds automatic casting when assigning to python types like dict,
      list, and attributes.  Instead of:
      
          dict["key"] = py::cast(val);
          m.attr("foo") = py::cast(true);
          list.append(py::cast(42));
      
      you can now simply write:
      
          dict["key"] = val;
          m.attr("foo") = true;
          list.append(42);
      
      Casts needing extra parameters (e.g. for a non-default rvp) still
      require the py::cast() call. set::add() is also supported.
      
      All usage is channeled through a SFINAE implementation which either just returns or casts. 
      
      Combined non-converting handle and autocasting template methods via a
      helper method that either just returns (handle) or casts (C++ type).
      3f1ff3f4
  7. 20 Oct, 2016 1 commit
  8. 13 Sep, 2016 1 commit
  9. 06 Sep, 2016 2 commits
  10. 19 Aug, 2016 1 commit
  11. 03 Jun, 2016 2 commits
  12. 05 May, 2016 1 commit
  13. 28 Apr, 2016 2 commits
  14. 26 Apr, 2016 1 commit
  15. 21 Mar, 2016 1 commit
  16. 12 Feb, 2016 1 commit
  17. 07 Feb, 2016 1 commit
  18. 17 Jan, 2016 1 commit
  19. 12 Dec, 2015 1 commit
    • John Travers's avatar
      Add ldflags to compile command · f7e43029
      John Travers authored
      On my system (Mac OS with custom Python installation) I had to add the ldflags argument to python-config to get things working.
      f7e43029
  20. 18 Oct, 2015 1 commit
  21. 15 Oct, 2015 2 commits
  22. 13 Oct, 2015 2 commits