Commit Graph

121 Commits

Author SHA1 Message Date
rdb 11ed8a4d8d Use dynamic type lookup for interrogate to eliminate inter-module dependencies
It is now no longer necessary to link to core.pyd
Also includes a slight coercion optimization for trivial types
2015-06-06 19:36:40 +02:00
rdb e2dfc935a1 Various refactoring, esp. of GLSL input system 2015-05-21 14:16:45 +02:00
rdb 52288e299b Fix interrogate regression that broke multiview support 2015-04-16 16:57:46 +02:00
rdb 426fdf0842 Fix issue where overloads with invalid default arg types weren't exported at all 2015-03-31 22:34:28 +02:00
rdb ff58db25ac Fix inheritance of hash functions, restore compare_to(), slot get_hash/get_key 2015-03-28 21:55:55 +01:00
rdb eaedfa68dc Fix regression: methods returning const char pointer were ignored. 2015-03-28 20:51:45 +01:00
rdb 53d10aa3a3 Fix sticky exception when passing over overloads with single string arg. 2015-03-28 20:51:08 +01:00
Sam Edwards 64120cd7d8 general: Add missing includes and forward-declarations. 2015-03-28 19:27:48 +01:00
rdb c9f8ccf901 Fix interrogate bug with detecting parameter coercion possibility 2015-03-25 19:37:00 +01:00
rdb 3371df8403 Fix tp_compare, better __repr__/__str__ handling 2015-03-25 19:36:35 +01:00
rdb de0b0dd879 Fix various issues with Python 3 support, fix samples to work with Python 3 2015-03-23 00:32:47 +01:00
rdb b63d5fbe8c Support cyclic garbage collection through PythonTask objects 2015-03-15 12:24:06 +01:00
rdb e608fa69c7 Merge branch 'master' into interrogate-overhaul
Conflicts:
	dtool/src/cppparser/cppBison.yxx
	dtool/src/interrogate/interfaceMakerPythonNative.cxx
2015-03-14 16:47:31 +01:00
rdb 04d4309b14 SSE2-enhanced sRGB encode (with runtime CPU detection) 2015-03-01 11:46:52 +01:00
rdb da3f642902 Various interrogate improvements 2015-02-27 15:01:42 +01:00
rdb e29efdd0c9 Don't use swap() as fallback for std::move(), it's more picky 2015-02-15 20:26:23 +01: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 4dc4c9eb3d Merge branch 'master' into interrogate-overhaul
Conflicts:
	dtool/src/interrogate/functionRemap.cxx
	dtool/src/interrogate/interfaceMakerPythonNative.cxx
	panda/src/event/pythonTask.cxx
	panda/src/express/multifile.h
	panda/src/express/pointerToArray.I
	panda/src/mathutil/config_mathutil.N
	panda/src/putil/config_util.N
	panda/src/putil/doubleBitMask.h
2015-02-11 14:41:58 +01:00
rdb cbd70ad8af Move all Python bindings out of core DLLs into the .pyd files. 2015-02-10 14:30:51 +01:00
rdb 5e905d4463 Fix various parser bugs, improve error reporting
(to show the included file chain -vv is now needed)
2015-01-04 20:30:24 +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 be1eb1d812 More minor linux packaging fixes 2014-12-29 15:16:33 +01:00
rdb a65b477734 Commit patches by cfsworks:
cxx: Fix missing includes masked by composite builds.
misc: Fix typos in comments.
config: Fix missing config forward-declarations.
direct: Adjust Python imports to panda3d.* instead of pandac.*.
display: Split graphicsWindow out into an extension.
framework: Use if/elif/elif/endif instead of ifdef/elif/elif/endif.
ode: Remove erroneous INLINE declarations.
interval: Fix missing import.
2014-10-19 22:41:47 +00:00
rdb f3094043df Fix left shift in Python (LP bug #1289475) 2014-10-19 15:50:54 +00:00
rdb 31a71c990d Fix issues with OS X 10.9 compilation, fix issues uncovered by clang 2014-10-12 18:45:37 +00:00
rdb 902bedc314 Fix Python 3 crash on Windows, and fix some Python 3-related compile errors 2014-10-10 13:45:05 +00:00
rdb 24386cdc1e Use a table to make InternalName::make more efficient for Python interned strings 2014-10-02 18:28:06 +00:00
rdb 778b4390f4 Temporary fix for Python 3 compilation error 2014-09-21 13:37:32 +00:00
rdb c178aba639 Add property support to interrogate (using MAKE_PROPERTY or using published members) 2014-09-19 15:23:52 +00:00
rdb a044561be5 *Always* check for exceptions in C++ methods, otherwise we miss important exceptions thrown in Python code called by C++ methods (like SystemExit!) 2014-08-26 21:01:12 +00:00
rdb e468b293d1 Fix a longstanding memory leak in certain interrogate exception handlers.
Raise MemoryError when constructor returns NULL.
Properly check argument count of constructors that take no arguments.
2014-08-26 17:17:37 +00:00
rdb 3e974abf5d Fix silly bug with longs 2014-07-23 17:41:22 +00:00
rdb f02662d4e0 Improve interrogate code readability, use METH_STATIC for static methods, support anonymous enums 2014-07-22 20:06:59 +00:00
rdb c257ce624e Interrogate overhaul that dramatically increases performance for the simpler methods 2014-07-18 13:54:38 +00:00
rdb 634190281d Support __pow__ in interrogate 2014-06-11 17:17:45 +00:00
rdb 5b967671fa Fix Python 3 build issue with iterator extensions 2014-05-23 13:42:26 +00:00
rdb d5d5de1d7e Make iterators work with interrogate by mapping None to NULL for the iternext method. Not the best solution, but is easy and fits most use cases. 2014-03-27 15:15:58 +00:00
rdb ae4bddd7f7 Fix Python 3 compile issue 2014-03-09 01:00:23 +00:00
rdb c213712600 fix windows build when the module is in different dll than the library defs 2014-02-20 18:38:35 +00:00
rdb 5f2c0a6e04 Big commit aiding in separation of Python bindings:
* Most extension functions have been moved to C++.
 * In makepanda, Python bindings are compiled into panda3d/<module>.pyd.
2014-02-20 13:33:26 +00:00
rdb f29c4681e1 Fix broken Python 3 support. 2013-12-17 17:42:16 +00:00
rdb 7926a5fa7b backward compatibility with Python 2.7 2013-10-27 18:51:20 +00:00
rdb cc3bae7e76 Big interrogate cleanup, new extension system, add __iter__ support, add buffer protocol support 2013-09-17 10:11:43 +00:00
rdb 8fff339477 A lot of code cleanup 2013-09-01 15:05:43 +00:00
David Rose 5178fb9523 fix problem with infinite recursion on coercion within constructors 2013-03-25 15:15:08 +00:00
rdb a9014cf933 reenable tp_richcompare (thanks David) 2013-02-20 10:44:48 +00:00
David Rose 53b472756b fix rich compare 2013-02-20 00:37:12 +00:00
rdb da44b3ae3b oops, disable broken rich compare for now 2013-02-19 19:21:41 +00:00
rdb 0f8361d730 Fix compile errors with Python 2 2013-02-18 12:28:52 +00:00
rdb 192d10b937 Experimental Python 3 support to the C++ code including interrogate. Also adds support for rich comparison in interrogate. 2013-02-16 19:22:26 +00:00