Bastien Montagne
bb89c89e7f
Cleanup: python: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
...
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.
This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.
MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.
NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.
Pull Request: https://projects.blender.org/blender/blender/pulls/135852
2025-03-12 11:21:53 +01:00
..
2024-09-25 18:04:27 +02:00
2025-01-07 12:39:13 +01:00
2024-12-13 14:54:19 +01:00
2025-01-07 12:39:13 +01:00
2024-09-25 18:04:27 +02:00
2025-01-07 12:39:13 +01:00
2025-02-13 17:56:42 +11:00
2025-01-07 12:39:13 +01:00
2025-03-12 11:21:53 +01:00
2025-01-07 12:39:13 +01:00
2024-09-25 18:04:27 +02:00
2025-01-07 12:39:13 +01:00
2024-09-25 18:04:27 +02:00
2025-01-07 12:39:13 +01:00
2024-09-25 18:04:27 +02:00
2025-01-07 12:39:13 +01:00
2024-09-25 18:04:27 +02:00
2025-01-07 12:39:13 +01:00
2024-09-25 18:04:27 +02:00
2025-01-07 12:39:13 +01:00
2025-02-13 17:56:42 +11:00
2025-01-07 12:39:13 +01:00
2025-02-13 17:56:42 +11:00
2025-01-07 12:39:13 +01:00
2024-09-25 18:04:27 +02:00
2025-01-07 12:39:13 +01:00
2025-01-17 10:13:31 +01:00
2025-01-07 12:39:13 +01:00
2025-01-07 12:39:13 +01:00
2025-02-13 18:58:08 +01:00
2025-02-13 17:56:42 +11:00
2025-01-07 12:39:13 +01:00
2025-02-13 17:56:42 +11:00
2025-01-31 17:03:18 +01:00
2025-01-07 12:39:13 +01:00
2024-09-25 18:04:27 +02:00
2025-01-07 12:39:13 +01:00
2025-02-13 17:56:42 +11:00
2025-02-13 17:56:42 +11:00
2024-09-25 18:04:27 +02:00
2025-01-07 12:39:13 +01:00
2025-01-07 12:39:13 +01:00
2025-01-07 12:39:13 +01:00
2025-01-07 12:39:13 +01:00
2025-02-13 16:53:27 +11:00
2025-01-07 12:39:13 +01:00
2025-01-31 17:03:18 +01:00
2025-01-07 12:39:13 +01:00
2025-03-12 11:21:53 +01:00
2025-01-07 12:39:13 +01:00
2025-01-07 12:39:13 +01:00
2025-01-07 12:39:13 +01:00
2025-03-12 11:21:53 +01:00
2025-01-07 12:39:13 +01:00
2025-01-24 16:45:32 +01:00
2025-01-07 12:39:13 +01:00
2025-01-31 17:03:18 +01:00
2025-02-13 17:56:42 +11:00
2025-01-07 12:39:13 +01:00
2025-01-04 19:09:54 +11:00
2025-01-07 12:39:13 +01:00
2025-02-18 12:43:43 +01:00
2025-01-07 12:39:13 +01:00
2025-01-07 12:39:13 +01:00
2025-01-07 12:39:13 +01:00
2025-03-12 11:21:53 +01:00
2025-01-07 12:39:13 +01:00
2025-02-12 13:56:06 +01:00
2025-01-20 17:39:25 +01:00
2025-01-07 12:39:13 +01:00
2025-01-07 12:39:13 +01:00
2024-11-03 16:07:40 +11:00
2025-01-07 12:39:13 +01:00
2025-01-20 17:39:25 +01:00
2025-01-07 11:27:20 +11:00
2024-10-30 15:08:37 +01:00
2025-01-07 12:39:13 +01:00
2025-03-06 10:19:49 +11:00
2025-01-07 12:39:13 +01:00
2025-01-31 17:03:18 +01:00
2024-09-25 18:04:27 +02:00
2025-01-24 16:45:32 +01:00
2025-01-07 12:39:13 +01:00
2025-01-31 17:03:18 +01:00
2025-01-07 12:39:13 +01:00
2025-01-24 16:45:32 +01:00
2025-01-07 12:39:13 +01:00
2025-01-16 21:07:29 +11:00
2025-01-07 12:39:13 +01:00