Commit Graph

36 Commits

Author SHA1 Message Date
rdb 16f2958adb cppparser: support sizeof operator with constexpr 2020-06-14 12:12:27 +02:00
rdb a9d6d3be46 interrogate: refactor default argument handling 2018-12-26 22:47:14 +01:00
Sam Edwards b2bfb31114 general: Remove `using std::*` from headers
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.

Closes #350
Closes #335
2018-06-14 16:04:49 +02:00
Sam Edwards e2b4353800 general: Replace NULL (and 0 as pointer) with C++11 nullptr
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
rdb 666591ff48 cppparser: fix compile warnings on MSVC 2018-05-06 22:19:33 +02:00
rdb a175ad6a82 interrogate: fix compile error with default values that call scoped functions 2017-04-07 13:56:47 +02:00
rdb e2771d39a9 cppparser: support for various C++11/C++14/C++17 features:
- decltype(auto)
 - attributes (ie. [[deprecated]]), incl. with C++17 "using"
 - extern template class (parses)
 - sizeof struct members
 - aggregate initialization
 - initializers in capture lists
 - alignas (parses)
2017-01-15 15:39:34 +01:00
rdb e12420571b cppparser: support C++11 lambda expressions 2017-01-14 22:37:33 +01:00
rdb 5aabd56697 cppparser: support C++11 raw string literals 2017-01-14 22:35:38 +01:00
rdb 22f0b50851 More Interrogate C++11 support changes:
* Parse variadic templates
 * Add (incomplete) type_traits support
 * Parse anonymous class template params
 * Parse volatile/lvalue/rvalue methods
 * Don't generate destructor for indestructible types
 * Add xmmintrin.h header
 * Allow invoking extensions with references
2016-11-03 12:17:11 +01:00
rdb fb78fe6e2a Interrogate enum class support (maps to Python 3.4 enums), sanify wrapper code 2016-05-07 00:45:26 +02:00
Sam Edwards d28608aed1 cppparser: Fix missing includes. 2016-03-15 18:30:24 -07:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb caa03c53dd Interrogate cppparser improvements, C++11/14/17 additions:
* Support trailing return type.
 * Ignore C++14 digit separators.
 * Parse C++14 binary number representations.
 * Support "using"-style type aliases.
 * Support decltype and auto with "new".
 * Remove silly "long float" and "long long float".
 * Support default visibility with class inheritance.
 * Remove -longlong hack since C++11 supports long long natively.
 * Support unary plus operator.
 * Preserve bitfield definitions.
 * Support constructor inits using braces.
 * Support override/final specifiers.
 * Ignore [[attributes]] in certain cases
 * Add support for typeid() in expressions
 * Parse (but ignore) lambda expressions
 * Differentiate between casts, add const_cast/reinterpret_cast
 * Support thread_local variables.
2016-02-16 01:18:51 +01:00
rdb 9a38a6b075 Handle bool expressions separately in cppparser 2016-01-31 17:47:25 +01:00
rdb be60303502 Support =default and =delete methods in Interrogate 2016-01-03 19:56:20 +01:00
rdb 1b857d6bda A few interrogate improvements 2015-11-28 17:54:01 +01:00
rdb da17cce447 Fix error and warnings in 32-bit Windows build 2015-11-01 16:57:52 +01:00
rdb 920210c999 Fix the vast majority of Interrogate parse issues and warnings, add support for inline namespace and constexpr 2015-10-16 14:57:40 +02:00
rdb 6a0c98d54e Work around strange interrogate issues 2015-10-13 15:40:48 +02:00
rdb b65ad853fe Support C++11/14 features: nullptr, decltype, unicode literals, custom literals, alignof 2015-10-12 23:32:50 +02:00
rdb 8e76328b3b Fix Bullet support (Broken float division in default args in interrogate) 2015-04-09 13:08:17 +02:00
rdb 9513046e59 Various substantial changes to Interrogate:
* Allow arbitrary selection of optional keyword arguments in some cases
* Reduce code bloat of generated bindings
* Work around awkward resolution of set_shader_input overloads
* Document the code a bit better
* Make coercion a bit cleaner for reference counted types
* A few optimization tweaks
* Use generic errors in NDEBUG build to reduce size of string pool
2015-02-15 13:48:13 +01:00
rdb 6db5d0dc11 Huge cppparser and interrogate overhaul, bringing:
* Better support for typedefs
* Same code should compile for both 32-bit and 64-bit
* C++11 typed enum support
* Synthesize __setitem__ when operator [] returns reference
* Rewrite coerce system to have better performance
* Change semantics of __getattr__ and __setattr__ to match
  Python's, add __getattribute__, __delattr__ and __delitem__
* Improve performance of slot functions a bit more
* Reduce memory overhead of type system
* Some support for wrapping arrays of numeric types
* C++11 character type support in cppparser
* Chars are handled as strings of length 1
* Template functions for CreatePyInstance that use runtime type map
* More functions from dtool as extension functions
* Code cleanup
2014-12-30 16:43:52 +01:00
rdb 5437a3e5a9 Allow const variables with initializers to be used in expressions (like enum definitions). Also fix compiler warning. 2014-09-14 22:02:16 +00:00
David Rose 58e0537e3c wide interrogate improvements: sequence protocol, MAKE_SEQ, __setitem__, and parameter coercion 2008-11-07 21:12:42 +00:00
David Rose fb9c56432a we are now using the modified BSD license 2008-05-28 18:37:20 +00:00
David Rose 611a10f796 try again to satisfy compilers 2008-01-17 01:22:57 +00:00
David Rose 651513d595 use reinterpret_cast for 64-bit architecture 2007-09-13 19:25:09 +00:00
David Rose 843c0331ae update license, change remaining local #includes to use quotation marks 2004-02-13 19:27:33 +00:00
David Rose 3496d7fedc be more forgiving with || and && in #if expressions 2003-01-21 19:29:31 +00:00
David Rose 861c762e7d first wave of new ffi/interrogate 2001-10-02 22:25:32 +00:00
David Rose ae2466fb2f eliminate compiler warnings 2001-08-04 20:58:12 +00:00
David Rose 2f4e207edb Update copyright header 2001-05-25 21:27:38 +00:00
David Rose fcb24f02ef remove tab characters 2001-05-25 15:56:49 +00:00
David Rose 7a78284129 Initial revision 2000-10-04 00:15:23 +00:00