rdb
98054d1bbd
interrogate: Support reverse binary operators as extension methods
...
Necessary for implementing #1048
2021-07-05 14:12:39 +02:00
rdb
18e8918138
interrogate: Reimplement subscript assignment "operator"
...
This redoes the handling of `obj[n] = item` to occur in InterrogateBuilder instead so that it doesn't prevent the same remap from being used as getitem.
This fixes the non-const variant of InstanceList[n].
2021-04-25 11:27:18 +02:00
rdb
e4ecb548bf
interrogate: Use __bool__ for default name of operator bool
2021-03-09 19:33:50 +01:00
rdb
179f316b36
interrogate: Wrap anonymous parameter names as positional-only args
2021-03-01 19:33:43 +01:00
rdb
f6b1b6dbb0
interrogate: Support three-way comparison operator <=>
2021-03-01 19:33:35 +01:00
rdb
684992cf8f
cppparser: C++20 features: spaceship operator, char8_t, constinit/eval
2021-03-01 19:33:31 +01:00
rdb
8cbe36b352
Merge branch 'release/1.10.x'
2021-03-01 19:33:27 +01:00
rdb
eab1308438
interrogate: Fix bug sorting overloads of AsyncFuture::set_result()
2021-03-01 10:59:02 +01:00
rdb
5ae08eadf7
Merge branch 'release/1.10.x'
2021-02-22 19:38:49 +01:00
rdb
7ed9f573e7
interrogate: Map operator / to true divide unless it takes an int
...
This is a little less conservative than the previous behaviour of only mapping if it takes a float, but this behaviour is more intuitive for non-scalar operands such as for Filename's operator /.
2021-02-22 19:14:18 +01:00
rdb
601ca323f5
interrogate: Support __truediv__, __floordiv__, etc. special methods
2021-02-22 18:13:34 +01:00
rdb
613441060b
Merge branch 'release/1.10.x'
2021-01-18 23:47:36 +01:00
rdb
0b53355347
interrogate: respect SOURCE_DATE_EPOCH setting for file identifiers
...
This can be used to ensure that the build is bit-for-bit reproducible.
See https://reproducible-builds.org/docs/source-date-epoch/
2021-01-18 02:34:16 +01:00
rdb
e099d9e787
Merge branch 'release/1.10.x'
2021-01-02 02:33:35 +01:00
rdb
99f9352e76
interrogate: improvements to __setstate__ handling:
...
* Force single arg variant, easing argument parsing
* Allow defining __setstate__ taking multiple args, leading to tuple unpack
* Allow __setstate__ to be called on already initialized object (useful with __reduce__)
2021-01-01 15:57:41 +01:00
rdb
3e1d4aa6b5
interrogate: Fix memory leak in __setstate__
2020-12-31 18:12:52 +01:00
rdb
1793c9a938
interrogate: Fix __setstate__ not working for subclasses
2020-12-31 18:11:50 +01:00
rdb
a6e6826939
interrogate: support __getstate__ and __setstate__
...
The latter in particular will be called instead of __init__, so must construct the object.
2020-11-17 22:35:25 +01:00
rdb
c788912070
Merge branch 'release/1.10.x'
2020-10-02 12:20:58 +02:00
rdb
5655e97ec1
interrogate: fix misbehaving == and != operator if only < is defined
...
Fixes comparison of two empty RenderEffects objects
2020-09-16 23:21:16 +02:00
rdb
66ac3be604
Merge branch 'release/1.10.x' into master
2020-09-12 23:23:58 +02:00
rdb
dabab90415
interrogate: Fix compilation error of bindings with Python 3.9+
2020-09-12 22:50:03 +02:00
rdb
707ea089cb
Merge remote-tracking branch 'origin/release/1.10.x'
2020-09-01 11:09:29 +02:00
rdb
ab6bf5f4f7
general: Add workaround for Windows bug in various uses of isprint()
...
See #994 ; there is a regression in certain versions of the Windows CRT that gives the wrong result for isprint(). This adds workarounds to various potentially affected locations where isprint() is being used.
2020-08-21 14:51:42 +02:00
rdb
a203ff11fc
interrogate: support __getstate__ and __setstate__
...
The latter in particular will be called instead of __init__, so must construct the object.
2020-04-01 18:59:44 +02:00
rdb
a34867ae4f
interrogate: support __int__ -> nb_int slot mapping
2020-04-01 18:59:44 +02:00
rdb
c59b91f503
Merge branch 'release/1.10.x'
2020-02-23 14:53:16 +01:00
rdb
4ef8e5228e
interrogate: fix ability to return ReferenceCount-like classes
...
Classes with virtual ref(), unref() and get_ref_count() methods, like RecorderBase, could not be returned by PT() from methods because they didn't inherit from ReferenceCount. However, classes do not need to inherit ReferenceCount to be able to be tracked by a PointerTo, and defining an abstract base class with pure virtual ref()/unref()/get_ref_count() is a way to avoid dual inheritance of ReferenceCount.
2020-02-22 12:10:55 +01:00
rdb
b272af8bbf
Merge branch 'cmake'
2020-01-22 11:20:51 +01:00
pmp-p
8615e25a12
interrogate: use fully qualified module name in PyModule_Create
...
This is helpful when static linking and explicitly initializing the modules.
Closes #308
2019-12-11 16:49:42 +01:00
Sam Edwards
4556059c90
CMake: Use find_program to detect host tools when cross-compiling
...
In the future, we should also try to do find_package(Panda3D) to use
the host tools even if Panda3D isn't in a system path.
2019-11-13 15:30:26 -07:00
Sam Edwards
9b7bcf2564
Merge branch 'master' into cmake
2019-11-07 21:21:04 -07:00
rdb
d2bd4181e0
interrogate: set tp_base to DTOOL_SUPER_BASE and tp_basicsize to 0
...
The tp_basicsize field, as well as a few others, seem to be inherited from whatever is set in tp_base. In absence of a tp_base, Python will set it to PyBaseObject_Type, which is not at all correct for Panda types.
2019-11-06 10:49:53 +01:00
Sam Edwards
0e0b2186c7
CMake: Add #line directives to interrogate_preamble_python_native
2019-11-04 16:43:12 -07:00
Sam Edwards
12c16eb9ff
Merge branch 'master' into cmake
2019-10-15 23:43:25 -06:00
Sam Edwards
9ecaa0056b
CMake: Break out p3interrogatedb as a first-class library
2019-10-15 23:27:03 -06:00
rdb
247f3c415a
Merge branch 'release/1.10.x'
2019-10-08 19:50:48 +02:00
rdb
3c9591cfbf
interrogate: envelop function calls in parentheses
...
This reduces the risk of calling a preprocessor macro instead of a method.
2019-10-08 19:43:34 +02:00
Sam Edwards
5961cc2ee0
Merge branch 'master' into cmake
2019-10-05 15:00:49 -06:00
rdb
5242b6a8b4
interrogate: remove apparently-unused definition
2019-09-16 21:22:16 +02:00
rdb
2c42cfcc1a
Merge branch 'release/1.10.x'
2019-09-10 16:34:11 +02:00
rdb
72b1814331
interrogate: fix comment in C bindings for default arguments
...
Fixes #732
2019-09-10 09:37:25 +02:00
rdb
b3f3f53e01
interrogate: fix missing std:: prefix for string_holder
2019-09-10 09:37:25 +02:00
Paul m. p. P
35b80d0751
interrogate: add missing async/await keywords
...
Closes #735
2019-09-10 09:37:24 +02:00
Sam Edwards
dbe7a2f94b
Merge branch 'master' into cmake
2019-09-06 04:05:12 -06:00
rdb
d92b440617
Merge branch 'release/1.10.x'
2019-09-06 09:46:20 +02:00
rdb
57ff1a5441
interrogate: remove vestigial code causing assert for C bindings
...
Fixes #722
2019-09-03 12:15:02 +02:00
Sam Edwards
5fa4af9189
CMake: Rely on GNUInstallDirs to specify install paths
...
This makes multiarch OSes happy as they can dictate that
64-bit libraries go into 'lib64'
2019-08-31 00:48:42 -06:00
Sam Edwards
19ed9f6b47
Merge branch 'master' into cmake
2019-08-24 18:07:12 -06:00
Sam Edwards
896a8dbca5
CMake: Some more changes to p3pystub
...
- Don't build it at all on Win32 where it isn't needed
- Don't link it into interrogate_module (oops, missed that)
2019-08-22 14:58:43 -06:00