rdb
bf190f7306
interrogate: support MAKE_MAP_PROPERTY
2017-10-09 00:02:46 +02:00
rdb
0e2b14cf4c
pgraph: custom binding for set_shader_input()
...
Should be faster and more reliable at PTA handling
We no longer need the interrogate perf hack for the first-arg InternalName
Fixes : #161
2017-10-08 17:50:28 +02:00
rdb
7ff8b62fb8
interrogate: various fixes:
...
* handle static methods with explicit self
* fix len() and __setitem__ of mapping types
* fix inheritance of __getattr__ and __setattr__
* fix overload resolution error with nullptr_t arguments
* bool overloads now come after float/double overloads
* record whether class is final in interrogatedb
* add Dtool_EmptyTuple
* optimization for final classes: no need for downcast
2017-09-19 18:46:21 +02:00
rdb
d1c34c3360
interrogate: support static properties
2017-08-07 22:04:56 +02:00
rdb
a387fb9f35
interrogate: nullptr handling, faster kwargs handling in some cases
2017-05-14 22:19:25 +02:00
rdb
e1c916cdc3
interrogate: handle implicit destructors correctly
2017-04-02 14:44:51 +02:00
Sam Edwards
ea1ba281b5
interrogate: Add missing cast in generated calls to PyObject_INIT_VAR
2017-03-08 01:54:21 -07:00
rdb
cfe810ace7
Add set_shader_inputs for efficiently setting multiple shader inputs
2017-02-06 13:16:27 +01:00
rdb
4ed199cece
Fix various compile warnings and a few code consistency issues
2017-01-09 20:36:53 +01:00
rdb
32377cb618
interrogate: fix to allow pointers to forcetyped classes
2016-12-07 23:04:15 +01:00
rdb
29411f5e14
Merge remote-tracking branch 'origin/release/1.9.x'
2016-10-31 22:32:39 +01:00
rdb
5832ab8099
Fix errors when trying to raise vectors to a power
2016-10-31 22:10:47 +01:00
rdb
47388b0dbc
Separate out CPython calls from core libs; eliminate need for pystub
2016-07-20 14:30:41 +02:00
rdb
8381118a97
Assorted tweaks and compile warning fixes
2016-07-14 12:54:39 +02:00
rdb
0821bec2d0
Backport 2f0bc01 to 1.9: Fix bug causing random crash during module initialization
2016-06-22 15:04:00 +02:00
rdb
4283a63a7d
Merge branch 'release/1.9.x'
2016-06-11 01:29:14 +02:00
rdb
ba919b0948
Fix crash running TaskTester
2016-06-11 01:11:03 +02:00
rdb
7d6b7f40f5
Merge branch 'release/1.9.x'
2016-06-09 21:52:51 +02:00
rdb
b303962e96
Disable cycle detection in tasks for now, it is way too unstable
2016-06-09 16:48:31 +02:00
rdb
8d05ef3022
Assorted fixes
2016-06-03 22:23:42 +02:00
rdb
5543716660
Interrogate wraps vector<unsigned char> as Python 3 bytes object
2016-06-03 01:47:54 +02:00
rdb
ce29ae490d
Interrogate improvements, more properties, MAKE_SEQ_PROPERTY
2016-05-11 00:16:53 +02:00
rdb
fb78fe6e2a
Interrogate enum class support (maps to Python 3.4 enums), sanify wrapper code
2016-05-07 00:45:26 +02:00
rdb
5feecd2243
Fix iterator support in interrogate
2016-04-28 11:08:23 +02:00
rdb
2f0bc01b68
Fix bug causing random crash during module initialization
2016-04-18 14:34:50 +02:00
rdb
15b0ba45f9
Fix broken pickling in Python 3 build
2016-03-31 16:49:27 +02:00
tobspr
0fcfb8e372
New file headers, new comment style
2016-02-17 17:47:48 +01:00
rdb
ef72a0a410
Merge branch 'release/1.9.x'
2016-02-11 19:09:25 +01:00
rdb
bb684b2a07
Fix a few issues with obscure CPython-based deployments
2016-02-09 12:33:57 +01:00
rdb
090e912ce6
Cleanup of comments and whitespace
2016-02-01 22:30:43 +01:00
rdb
8a205ac100
MAKE_PROPERTY should ignore setter overloads that take the wrong number of arguments
2016-01-25 17:02:25 +01:00
rdb
bccddaf4e8
TextNode properties, fix setters that return error bool
2015-12-29 18:46:37 +01:00
rdb
db6f0342cc
Add properties with has/clear (interrogatedb v3.1)
2015-12-24 14:25:45 +01:00
rdb
6480e82e3b
First pass adding properties to many Panda classes
2015-12-10 16:23:06 +01:00
rdb
50d2e8324e
Merge branch 'release/1.9.x'
...
Conflicts:
.travis.yml
direct/src/directtools/DirectLights.py
panda/src/nativenet/buffered_datagramconnection.h
2015-12-06 22:32:12 +01:00
rdb
287c44ce53
Various fixes for Python 3 versions before Python 3.3
2015-12-06 22:05:44 +01:00
rdb
1b857d6bda
A few interrogate improvements
2015-11-28 17:54:01 +01:00
rdb
0a9f9887f9
Merge branch 'release/1.9.x'
...
Conflicts:
direct/src/p3d/Packager.py
direct/src/p3d/ppackage.py
makepanda/makepandacore.py
2015-11-21 03:17:33 +01:00
rdb
4c61db6374
Consider non-const overload before considering const overload in Python bindings
2015-11-20 20:24:58 +01:00
rdb
d3885b665e
Fix static MAKE_SEQs (eg WebcamVideo.get_options(), MicrophoneAudio.get_options())
2015-11-20 02:05:44 +01:00
rdb
ac1c036cac
interrogatedb 3.0 to restructure make_seq, improve make_seq handling and performance
2015-11-09 18:03:30 +01:00
rdb
da17cce447
Fix error and warnings in 32-bit Windows build
2015-11-01 16:57:52 +01:00
rdb
0ae2df7e02
Merge branch 'release/1.9.x'
2015-11-01 15:54:58 +01:00
rdb
63a9b5dfec
Re-expose MouseWatcherGroup; clearer error message for make_seq when getter is not exposed
2015-11-01 15:45:52 +01:00
rdb
7738294657
Fix a few more type size issues
2015-10-07 19:10:52 +02:00
rdb
18ad6d1543
Replace many int params with size_t params where appropriate, and work towards fixing type conversion warnings
2015-10-07 18:58:26 +02:00
rdb
036adff924
Merge branch 'release/1.9.x'
2015-09-30 14:07:21 +02:00
rdb
fcd3bfd15c
Fix interrogate issues with long, streampos, streamoff, streamsize and ptrdiff_t
2015-09-28 13:08:38 +02:00
rdb
d3487eba6b
Set visibility attributes on all exported bindings
2015-09-07 23:31:15 +02:00
rdb
3cd15c3d48
Merge branch 'release/1.9.x'
2015-08-31 15:59:06 +02:00
rdb
56b94eb815
Don't raise exception in tp_traverse, instead silently passing case where object is already destructed
2015-08-28 16:28:03 +02:00
rdb
64144955a0
Fix for typedefs to external types in interrogate
2015-07-29 10:45:55 +02:00
rdb
5913546229
Proper overflow checking for numeric chars
2015-07-08 02:03:24 +02:00
rdb
342b9a8db8
Merge remote-tracking branch 'origin/release/1.9.x'
2015-07-08 02:01:28 +02:00
rdb
828e52578d
Allow a long (provided it is not overflowing) where an int is accepted
2015-07-08 01:58:35 +02:00
rdb
cbcb2416d7
Merge branch 'release/1.9.x'
2015-07-06 10:32:30 +02:00
rdb
69b8d6a4b5
Fix memory leak in tuple-returning getters
2015-07-06 10:31:33 +02:00
rdb
7026854cc2
Fixes to get the C binding generator to work
2015-07-05 16:07:08 +02:00
rdb
d9342043b0
Deprecate pandac.PandaModules and genPyCode, move extensions to panda3d/, clean up imports and deprecated behaviour
2015-06-28 13:55:31 +02:00
rdb
269b4eac27
Fix METH_NOARGS calling convention violations in interrogate, and special support for LINK_ALL_STATIC in interrogated code
2015-06-21 17:53:37 +02:00
rdb
7a836cbbd9
Merge branch 'release/1.9.x'
2015-06-21 17:46:34 +02:00
rdb
8ecf6a7b9f
Fix getattr() and hasattr() of vector classes when invalid attribute name is used
2015-06-21 15:33:42 +02:00
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
David Rose
9294ea77f7
interrogate supports wchar_t * and L"foo"
2011-11-29 23:25:23 +00:00
David Rose
134e9a9e92
dual names for interrogate
2011-10-11 00:45:51 +00:00
David Rose
6bed0cf394
bool should return a bool
2011-09-28 17:42:46 +00:00
rdb
319b8c4cb1
More stuff related to extensions
2011-01-03 08:25:13 +00:00
David Rose
d51e49516a
allow __py__ functions for python-only optimizations
2010-06-16 21:57:37 +00:00
David Rose
aa76a9f59d
support class method versions of MAKE_SEQ
2010-06-13 22:03:46 +00:00
David Rose
bb96117de2
interrogate fix for ode::get_id()
2010-05-25 21:12:44 +00:00
David Rose
a942ce5fbf
lists and strings will be automatically coerced into a PTA_blah
2010-02-11 22:38:34 +00:00
David Rose
f6f9e269f4
introduce stdpy.pickle module with support for common-node NodePaths within a pickle stream
2010-02-10 19:43:58 +00:00
David Rose
816ddc0387
low-level support for python copy and pickle modules
2009-12-10 01:09:06 +00:00
David Rose
1d3719ccb7
add tinyxml.h, fix char *NULL return value case
2009-10-13 21:28:18 +00:00
David Rose
8f5102d889
interrogate fix
2009-09-30 22:35:58 +00:00
David Rose
383a6e512c
support tinyxml's (const string *) return types.
2009-08-11 17:24:56 +00:00
David Rose
1db044ca4e
add hash(Filename)
2009-08-07 15:27:58 +00:00
David Rose
0e773c8684
respect __nonzero__
2009-08-05 21:51:28 +00:00
David Rose
70e1e46a61
coercion memory leak fix, part 1
2009-06-10 14:33:44 +00:00
David Rose
2982ca3187
python 2.4
2009-02-19 00:38:44 +00:00
David Rose
221862b432
squelch compiler warnings about (char *)
2009-02-18 23:27:04 +00:00
David Rose
f477db0b19
might as well expose int and float typecasts, too
2009-01-20 19:51:31 +00:00
David Rose
a6f4fb2377
operator bool () -> __nonzero__()
2009-01-20 03:17:44 +00:00
David Rose
4cd50fa68d
fix performance issues with implicit parameter coercion
2009-01-07 20:05:57 +00:00
David Rose
1462bee771
better Filename usage
2008-11-11 23:28:14 +00:00
David Rose
587f000ab5
correct prototype for setitem
2008-11-08 16:55:57 +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
9468e4583c
further refinements to local_this checking
2008-10-29 19:06:57 +00:00
David Rose
f7105a081b
raise an exception if 'this' is null
2008-10-29 00:53:27 +00:00
David Rose
e81660a741
check PyErr_Occurred() even in ndebug mode
2008-09-27 00:12:08 +00:00
David Rose
524128b9fd
wip: starting experimental C-based task manager
2008-09-19 00:58:04 +00:00
David Rose
fb9c56432a
we are now using the modified BSD license
2008-05-28 18:37:20 +00:00
David Rose
ef5b2fe57e
squelch warning
2007-09-20 18:22:16 +00:00
David Rose
3804f89682
wchar_t might not be two bytes wide
2007-09-05 18:02:47 +00:00
David Rose
06a36aff63
get runtime info for things that don't inherit from TypedObject
2007-06-22 22:35:57 +00:00
David Rose
8d2bdc39fd
first pass at SIMPLE_THREADS
2007-06-21 15:33:27 +00:00
David Rose
137998a5c7
track_in_interpreter
2007-05-09 22:07:48 +00:00
David Rose
346928ece7
support BLOCKING keyword
2007-04-18 21:51:36 +00:00
David Rose
0be53cccf6
interrogate changes: respect const, use Python names in diagnostic messages
2007-02-08 20:15:54 +00:00
David Rose
616de46c25
use as_typed_object()
2006-09-07 17:22:22 +00:00
David Rose
990174f44e
class TypedObject is a typed class
2006-09-06 18:44:14 +00:00