Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #91015 > unrolled thread
| Started by | Skip Montanaro <skip.montanaro@gmail.com> |
|---|---|
| First post | 2015-05-21 11:41 -0500 |
| Last post | 2015-05-21 11:41 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Strategies for using cffi with C++ code? Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-21 11:41 -0500
| From | Skip Montanaro <skip.montanaro@gmail.com> |
|---|---|
| Date | 2015-05-21 11:41 -0500 |
| Subject | Strategies for using cffi with C++ code? |
| Message-ID | <mailman.203.1432226500.17265.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
If my reading so far is correct, you can't directly apply cffi to C++ libraries. Everything has to be wrapped in "extern C" declarations, which means, practically speaking, that you have to provide factory function wrapper(s) around constructors and methods. I did find a trivial example: https://gist.github.com/tonyseek/7821993 but that just exposes a simple function to the Python programmer. Does someone have a pointer to more substantive example of exposing a C++ class to Python? Thanks, Skip
Back to top | Article view | comp.lang.python
csiph-web