Commit Graph

30 Commits

Author SHA1 Message Date
Henry Schreiner
37f845a1dc
ci: disallow some common capitalization mistakes (#2472)
* ci: only annotate linux for now

* style: block some common mistakes
2020-09-08 15:26:50 +02:00
Lin Hsu
d031efe788 Typo 2020-07-01 00:08:05 +02:00
Eric Cousineau
baf69345f6 Minor modifications to interrupt handling FAQ (#2007) 2019-11-25 22:14:06 +08:00
Charles Brossollet
0f1d3bfee2 Add FAQ entry for dealing with long functions interruption (#2000)
* Add FAQ entry, with code example, for dealing with long functions interruption
2019-11-25 17:59:53 +08:00
Ivor Wanders
2b045757b5 Improve documentation related to inheritance. (#1676)
* Adds section to the reference.
* Adds section to advanced classes page describing how to use `get_overload`.
2019-06-10 22:12:28 +02:00
Ahuva Kroizer
8f5b7fce84 FAQ addition (#1606)
* Add possible solution to ImportError issue
2018-11-13 13:25:57 +01:00
Semen Yesylevskyy
ef13fb2e1c Info about inconsistent detection of Python version between pybind11 … (#1093)
* Info about inconsistent detection of Python version between pybind11 and CMake in FAQ
2018-09-12 00:20:56 +02:00
David Caron
307ea6b7fd Typo 2018-04-24 17:44:57 -03:00
Marc Schlaich
ab003dbdd9 Correct VS version in FAQ 2018-03-10 14:19:31 -04:00
Wenzel Jakob
e7d304fbc6
added citation reference (fixes #767) (#1189) 2017-11-17 18:44:20 +01:00
Dean Moldovan
56613945ae Use semi-constexpr signatures on MSVC
MSCV does not allow `&typeid(T)` in constexpr contexts, but the string
part of the type signature can still be constexpr. In order to avoid
`typeid` as long as possible, `descr` is modified to collect type
information as template parameters instead of constexpr `typeid`.
The actual `std::type_info` pointers are only collected in the end,
as a `constexpr` (gcc/clang) or regular (MSVC) function call.

Not only does it significantly reduce binary size on MSVC, gcc/clang
benefit a little bit as well, since they can skip some intermediate
`std::type_info*` arrays.
2017-09-16 12:02:49 +02:00
Jason Rhinelander
97aa54fefa Compile with hidden visibility always; set via cmake property rather than compiler flag
This updates the compilation to always apply hidden visibility to
resolve the issues with default visibility causing problems under debug
compilations.  Moreover using the cmake property makes it easier for a
caller to override if absolutely needed for some reason.

For `pybind11_add_module` we use cmake to set the property; for the
targets, we append to compilation option to non-MSVC compilers.
2017-08-14 11:44:17 -04:00
Dean Moldovan
443ab5946b Replace PYBIND11_PLUGIN with PYBIND11_MODULE
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".
2017-05-29 03:21:19 +02:00
Lori A. Burns
5cafc99884 add CMake exported interface library and Config detection file 2016-12-13 21:44:19 +01:00
Wenzel Jakob
2fb5f1d0c3 added message about recursion limits 2016-11-16 17:37:10 +01:00
Jason Rhinelander
fb7c9fd326 Remove obsolete example reference (#457)
* Remove obsolete example reference
* Make example fully-working (except for #includes)

Fixes #456.
2016-10-22 18:54:33 +02:00
Jason Rhinelander
20ef62656f Fix minor documentation spelling mistakes 2016-09-21 13:39:02 -04:00
Wenzel Jakob
fe34241e50 minor doc & style fixes 2016-09-06 13:02:29 +09:00
Wenzel Jakob
70f5a4dc8b minor: added error message to faq 2016-09-05 17:19:18 +09:00
Wenzel Jakob
f600c1d899 updated FAQ section on Python detection 2016-06-03 14:47:54 +02:00
Wenzel Jakob
a439ccaa0e minor FAQ edits, referenced cppimport project 2016-05-17 10:47:52 +02:00
Wenzel Jakob
c62360d994 minor FAQ updates 2016-05-03 14:32:47 +02:00
Wenzel Jakob
f64feaf3e4 documentation improvements 2016-04-28 15:32:07 +02:00
Wenzel Jakob
e84f557edf documentation improvements 2016-04-26 23:48:55 +02:00
Wenzel Jakob
c79dbe425d FAQ improvements 2016-04-18 10:53:38 +02:00
Wenzel Jakob
2e03a5857c added comment about cmake issues (#99) 2016-04-14 11:27:15 +02:00
Wenzel Jakob
50ed3614de added a faq entry about import issues 2016-04-11 17:38:25 +02:00
Wenzel Jakob
a3e34f4a5f comment about old versions of visual studio 2016-03-15 15:06:47 +01:00
Wenzel Jakob
4a48afb356 doc updates 2016-03-09 21:31:21 +01:00
Wenzel Jakob
de623a7668 added faq 2016-03-09 21:11:19 +01:00