Commit Graph

3213 Commits

Author SHA1 Message Date
rdb af27a9523c Merge branch 'release/1.10.x' 2024-03-12 15:39:16 +01:00
rdb 0ce7215ee9 interrogate: Fix typo in code
Fixes #1627

[skip ci]
2024-03-12 15:10:14 +01:00
darktohka b049c891d1 ext: Use different names for each gen_next method 2024-02-10 23:49:28 +01:00
rdb 73360393df Switch use of Py_INCREF to new Py_NewRef function
This is more idiomatic, simplifies the code, makes it easier to port to eg. HPy later on, and makes it easier to use the limited ABI (where it can be optimized to a tail call) later on

A polyfill is provided for compatibility with Python versions 3.8 and 3.9
2024-01-29 17:57:53 +01:00
rdb 4b748d1aba dtoolutil: Fix issue compiling interrogate without HAVE_PYTHON
Closes #1608

Co-authored-by: pmp-p <mail.peny@free.fr>
2024-01-28 15:15:27 +01:00
rdb 128000b03a dtoolutil: writelines() should accept any iterable 2024-01-28 15:15:27 +01:00
rdb 84ed141b2a Squash merge webgl-port branch into master
Adds support for emscripten as a build target / platform, and adds a WebGL renderer back-end
2024-01-25 15:37:38 +01:00
rdb b49dbaca2b Report errors if calls to `close()` fail 2024-01-25 12:33:20 +01:00
rdb 26ce3eab29 Update version number to 1.10.15 2024-01-23 14:24:23 +01:00
rdb c6c75092e1 interrogate: Reduce generated code, refactor bad args error code 2024-01-05 17:15:02 +01:00
rdb e04daec2fe Merge branch 'release/1.10.x' 2024-01-05 16:08:53 +01:00
rdb 7926a3a929 interrogate: Fix some pointless code generation case
Some cases of eg. inplace ternary operator would needlessly construct and then immediately destruct a tuple
2024-01-05 14:52:52 +01:00
rdb 37c9e58ea0 interrogate: Fix handling of RF_self / inplace binary operator 2024-01-05 14:32:26 +01:00
rdb 46e662bd8e interrogate: Add cleverness to avoid writing out dead code
Hopefully fixes GCC 13 compile regression, see #1580
2024-01-05 13:56:02 +01:00
rdb 034f1ea358 patomic: Implement futexes on macOS using ulock API
This is what is also used by the libc++ futex implementation on macOS, and should be more efficient than the fallback hash table approach
2023-10-21 14:46:51 +02:00
rdb 39e4e4167c CMake: Switch use of distutils.sysconfig to sysconfig in Python 3.12
Part of #1395
2023-10-15 11:43:42 +02:00
rdb c48fcba3d8 CMake: build tinydisplay using CMake
Based on work by @toadkarter (#1487) and @pmp-p (#1547)

Fixes #1481
2023-10-15 11:34:47 +02:00
rdb e01cb590de Merge branch 'release/1.10.x' 2023-10-13 23:24:48 +02:00
rdb c45e14a563 interrogatedb: Switch T_OBJECT to T_OBJECT_EX for this_metatype
T_OBJECT has been deprecated.
2023-10-13 21:21:29 +02:00
Mitchell Stokes 893f5ce492 Fix assert on Py_SIZE(long) when using Python 3.12
Starting with Python 3.12, passing a PyLong into Py_SIZE() triggers an
assertion. PyLong (and the whole C API) is transitioning to be more
opaque and expose fewer implementation details.
2023-10-13 10:54:33 +02:00
rdb 86aa437804 dtoolbase: Fix static init ordering regression
This was a regression in bf65624298 that caused crashes on startup in static builds due to the "small" DeletedBufferChain array not being initialized early enough

For some reason it wasn't being constant-initialized, it is now by setting the _buffer_size field to 0 initially and changing it later in get_deleted_chain
2023-10-09 12:49:04 +02:00
rdb 3160d7f3e9 py_panda: Don't use _PyUnicode_EqualToASCIIString in Python 3.13+
See #1523
2023-08-03 22:22:45 +02:00
Disyer 596ff9ddb8 python: Remove usage of private _PyUnicode C API calls 2023-08-03 21:35:33 +03:00
rdb 8cbf93162a cppparser: Backport enum scope fix to 1.10
From bc039a0476
2023-08-02 12:40:37 +02:00
rdb bc039a0476 cppparser: Allow referencing enumerant within enum scope 2023-08-02 11:06:32 +02:00
WMOkiishi ea84547805 general: Mark many constructors as `explicit`
Closes #1514
Fixes #1431
2023-08-02 08:18:43 +02:00
rdb 115a716a7d Implement support for custom TypedWritable subclasses in Python
Fixes #1495
2023-07-26 19:55:40 +02:00
rdb cdc95acf81 Merge branch 'release/1.10.x' 2023-05-08 20:08:48 +02:00
rdb 96b2f3a4d5 CMake: Split out Objective-C++ flags on macOS to fix crash
This now requires CMake 3.16

This is a similar fix as 987f2f036b but for CMake
2023-05-08 20:00:39 +02:00
rdb 75abee73e2 CMake: Disable FMOD Ex on macOS
There's no version of FMOD Ex that isn't linked against libstdc++.6.dylib, which is no longer available in the SDKs
2023-05-08 19:59:50 +02:00
rdb 600fa45d6e CMake: Fix typo in CMAKE_CXX_FLAGS variable on MSVC 2023-05-08 19:59:15 +02:00
rdb c958919037 Make API documentation for Filename and VirtualFileSystem clearer
Mention specifically that Filename methods act on the physical disk whereas VirtualFileSystem methods act on the VFS

Fixes #1493

[skip ci]
2023-05-08 11:19:03 +02:00
rdb 5d833c988a interrogate: Support explicit `cls` parameter for static methods 2023-05-05 10:55:06 +02:00
rdb 4bb6d8f6d8 interrogate: Additional string table size reductions for NDEBUG 2023-03-09 11:24:31 +01:00
rdb 05436a749f Merge branch 'release/1.10.x' 2023-03-09 11:23:19 +01:00
rdb 68927cad0b interrogate: Code size reduction for generated wrappers
No need to have a separate entry in the string table for every possible class for this uncommon error message
2023-03-09 11:00:36 +01:00
Disyer 108b317327 dtoolutil: Fix _MSC_VER macros that should be _WIN32 2023-02-26 11:50:41 +02:00
rdb 0a7be36be1 parser-inc: Add stub header for sys/sysctl.h for BSD (incl. macOS) 2023-02-22 17:33:49 +01:00
rdb eefb51f510 dtoolutil: Add small_vector implementation and use it
This vector implementation does is optimized for the case of having only a small number of elements, which are stored directly on the vector object rather than being allocated from the heap.  If the capacity exceeds this small number, then a heap allocation is done.

This should improve performance in a couple of cases where vectors typically store 1 element and rarely more than that.
2023-02-22 16:48:11 +01:00
rdb 72d610b8ae dtoolbase: Fix compiler warnings in MemoryHook 2023-02-22 16:47:14 +01:00
rdb f4d394ecd8 prc: Reorder ConfigDeclaration::Word fields for better packing 2023-02-20 22:24:12 +01:00
rdb 5e24e7347c cppparser: Implement is_trivially_copyable type trait 2023-02-20 21:04:36 +01:00
rdb 5e26aae1ff cleanup: Fix assorted issues uncovered by clang-tidy 2023-02-12 18:17:03 +01:00
rdb 1c37522026 Merge branch 'release/1.10.x' into master 2023-02-12 14:07:49 +01:00
rdb aaabb6a652 Fix assorted issues uncovered by clang-tidy 2023-02-12 13:55:59 +01:00
rdb a9e9cfae1c py_panda: Fix definition of _PyErr_OCCURRED for Python >3.12.0a5
It should not be redefined for Python versions after 3.3.3, and if it's not defined by Python, it should just map to PyErr_Occurred()

See also #1457
2023-02-12 13:22:16 +01:00
Disyer af4a1bc7a9 python: Use public PyErr_Occurred API instead of private macro
The _PyErr_OCCURRED macro was removed in Python 3.10, so we shouldn't keep any compat code left around for it
2023-02-12 02:36:57 +02:00
rdb 1867094afe Bump version number on release/1.10.x branch to 1.10.14 2023-01-09 13:25:26 +01:00
Frang 275fe32079
create PY_EXTENSION and friends (#1415) 2023-01-04 20:54:53 +01:00
rdb 2d606c07e3 dtoolbase: Remove unused `get_best_parent_from_Set()`
This method is no longer used as of e6f870ece6

Fixes #1421
2023-01-03 23:09:35 +01:00