Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #91015 > unrolled thread

Strategies for using cffi with C++ code?

Started bySkip Montanaro <skip.montanaro@gmail.com>
First post2015-05-21 11:41 -0500
Last post2015-05-21 11:41 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Strategies for using cffi with C++ code? Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-21 11:41 -0500

#91015 — Strategies for using cffi with C++ code?

FromSkip Montanaro <skip.montanaro@gmail.com>
Date2015-05-21 11:41 -0500
SubjectStrategies 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web