rdb
fa62344452
express: better fix for encrypt_string Python 3 issues
...
A workaround for the bug described in #684 was made in e080d33e31 but this fix is significantly cleaner.
Unit test was added.
2019-07-10 13:46:42 +02:00
rdb
d5788d9422
Merge branch 'release/1.10.x'
2019-07-10 12:22:56 +02:00
rdb
e080d33e31
interrogate: temp hack to make encrypt_string return bytes
...
Fixes #684
2019-07-10 09:54:57 +02:00
rdb
0ac36185a9
Merge branch 'release/1.10.x'
2019-05-02 21:34:25 +02:00
rdb
204cbe4464
interrogate: support unicode characters in Python 3 for 'char' arg
...
Fixes #626
2019-05-01 17:05:12 +02:00
rdb
daa57733cb
Merge branch 'release/1.10.x'
2019-04-14 23:11:03 +02:00
rdb
3ca3dfd13a
interrogate: fix in-place or (|=) operators (see #588 )
2019-04-14 17:10:52 +02:00
rdb
ba256a8b07
interrogate: fix regression in 2c91fdda1b
2019-03-04 22:51:20 +01:00
rdb
cbb3c182a5
Merge branch 'release/1.10.x'
2019-03-04 16:57:52 +01:00
rdb
8e4add0326
interrogate: fix refcount trouble assigning PyObject* properties
...
In particular, this fixes accessing PythonTask.__dict__
2019-03-04 16:46:28 +01:00
rdb
fa6c066b2f
interrogate: enable true division in Python 2 as well
...
This allows using "from __future__ import division" and get the expected result for divisions in Python 2.
Fixes #529
2019-03-03 10:29:39 +01:00
rdb
2c91fdda1b
interrogate: support in-place ops on properties (eg. light.color *= 2)
2019-02-19 13:46:38 +01:00
rdb
c37a33baef
interrogate: don't export bindings for global operators
...
linmath exports a global __mul__, which isn't really useful.
2019-02-19 13:45:37 +01:00
rdb
376cef51c4
interrogate: fix Python 3 crash with optional std::wstring args
...
This would cause PyMem_Free to be called on an uninitialized pointer if a default argument was not specified.
Fixes #542
2019-01-26 19:27:50 +01:00
Sam Edwards
0c890f059d
interrogate: Export Python entry points with EXPORT_CLASS
...
Closes #505
2019-01-03 12:39:22 +01:00
rdb
a9d6d3be46
interrogate: refactor default argument handling
2018-12-26 22:47:14 +01:00
rdb
e32388c2f8
interrogate: fix crash reading static property
2018-11-24 22:44:09 +01:00
rdb
598664ab80
interrogate: disambiguate case where static method shadows a property
...
While it becomes possible to do this now, it should not become standard practice, and we should deprecate cases where we already do it by renaming either the static method or the property.
Fixes #444
2018-11-12 16:31:54 +01:00
Sam Edwards
a9dfd8352e
general: Distinguish local/system includes
...
This changes includes so that local includes are consistently
#include "localFile.h"
while system and third-party includes are consistently
#include <systemFile.h>
This commit mostly converts the former to the latter; the two
exceptions are in android_main.cxx and fmodAudioSound.h, where
the reverse was necessary.
2018-11-10 18:00:10 -07:00
rdb
5ba09ec5a0
interrogate: fix compile error when building with LINK_ALL_STATIC
...
Fixes #442
2018-11-09 11:38:41 +01:00
rdb
49b72fb198
Move Python support code from libp3interrogatedb to generated module
...
This prevents libp3interrogatedb from having a dependency on the Python library.
See #387
2018-11-06 19:24:37 +01:00
rdb
e6f870ece6
Remove Python type tables from interrogatedb
2018-11-05 22:14:25 +01:00
rdb
cb9e65720a
interrogate: do not use MOVE in generated code, but use std::move
2018-09-09 13:48:50 +02:00
Mitchell Stokes
f663d215d5
Remove some unused variables
2018-08-19 16:55:07 +02:00
rdb
c4b657b5b2
interrogate: support implicit typecast operators in some cases
...
For example, this will let us pass a ConfigVariableFilename to anything that accepts a Filename, just like in C++.
Does not work if the return value if the typecast operator requires management.
2018-08-19 16:06:16 +02:00
rdb
68e7f681f4
interrogate: support enum class to limited extent in Python 2
...
Only the basics are supported; the __members__ or iter interface is not supported at this time.
See also #351 for discussion on pulling in enum34 module.
2018-07-02 12:16:35 +02:00
rdb
9441c28f61
interrogate: do not wrap methods with rvalue arguments
...
This could in theory be supported, but this is not really intuitive from a Python user's point of view.
2018-06-30 21:38:45 +02:00
rdb
b2c04a8c7a
interrogate: support scoped enum args and return values
2018-06-30 21:38:40 +02:00
rdb
c03a75d755
interrogate: use range for in various places for code cleanliness
2018-06-30 17:18:14 +02: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
rdb
b88bd99704
Various compiler warning fixes
2018-06-12 12:38:07 +02:00
rdb
4fe7fe4c88
interrogate: fix int8_t / signed char range checking on Android
2018-06-12 11:08:02 +02:00
rdb
1c476203fc
interrogate: remove Dtool_AddToDictionary (let me know if anyone uses this)
...
If any code is relying on this, please let me know and I will add it back. It appears to be redundant, though, since one can access DtoolClassDict directly.
Symbol kept around temporarily in order to keep ABI compatibility for a short while as people may not update their interrogate and Panda in sync, but it can soon be removed.
2018-06-11 13:43:30 +02:00
rdb
3cc88cd304
interrogate: clean up py_panda.h a bit more
...
Inching towards reducing code in py_panda and eventually having no Python-specific code in interrogatedb anymore.
2018-06-11 13:39:45 +02:00
rdb
be282627a8
express: make PointerTo directly initializable from nullptr
2018-06-04 11:21:18 +02:00
Sam Edwards
a9ffb9630b
dtool: Generate code using nullptr over NULL/0
2018-06-03 16:36:07 -06: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
db5dd98d33
general: further warning fixes, use -Wno-unused-variable if NDEBUG
...
Disabling unused variable checking is needed in NDEBUG builds because of the heavy use of temporary variables in asserts.
2018-05-30 22:51:04 +02:00
rdb
6b726fa697
general: fix various compiler warnings and issues exposed thereby
2018-05-30 11:09:35 +02:00
rdb
3b4d12cb99
interrogate: also fall back to compare_to in Python 2
...
This is to create the same behaviour in Python 2 and 3.
2018-05-21 11:55:46 +02:00
rdb
7125a3e587
interrogate: allow passing None for args that have NULL as default value
2018-04-05 20:49:13 +02:00
rdb
2450f31ef5
interrogate: remove deprecated and unneeded downcastTo*() functions
...
They have not been needed for a very long time, and they create an awkward reverse dependency of base classes on derived classes.
2018-02-27 15:06:12 +01:00
rdb
193e4b5f59
interrogate: clean py_panda.h; use macros to access Dtool_PyInstDef
2017-12-12 23:03:38 +01:00
rdb
69b3468b2c
interrogate: more improvements to seq/map wrappers
...
Gets rid of properties defined as both MAKE_SEQ_PROPERTY/MAKE_MAP_PROPERTY, which are just a bad idea. Instead, adds a way for map properties to define a separate "keys" interface.
Fixes : #203
2017-11-27 17:29:50 +01:00
rdb
404842e70b
interrogate: fix warning message caused by erroneously wrapped remap
...
Fixes : #191
2017-11-11 20:36:58 +01:00
rdb
b8bf8bd641
interrogate: fix crash when calling functions returning TypedWritable
2017-11-08 00:04:00 +01:00
rdb
1b1d80cd27
More thoroughly fix issues with pickling Panda objects in Python 3
...
This also adds DatagramBuffer, a class for writing datagrams to memory and reading them from there again.
2017-11-08 00:02:35 +01:00
rdb
483a491ed7
interrogate: simplify coercion code
...
This remove support for coercing non-ReferenceCounted types that are neither default-constructible nor move-assignable, but it turns out none of the classes we really need it for matches that.
It further cuts down on the amount of code that is being generated to support coercion in cases where it makes absolutely no sense.
2017-11-06 19:53:38 +01:00
rdb
96d237377b
interrogate: add various sequence/mapping methods to seq/map property
2017-11-05 18:01:39 +01:00
rdb
0c0f9adab9
Support coroutines and async/await in the task manager and loader
2017-10-31 18:56:41 +01:00