Commit Graph

406 Commits

Author SHA1 Message Date
rdb 105f938d68 interrogate: Fix non-deterministic order of external import types
Fixes #1651
2024-05-28 11:11:21 +02:00
rdb 0ce7215ee9 interrogate: Fix typo in code
Fixes #1627

[skip ci]
2024-03-12 15:10:14 +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 5d833c988a interrogate: Support explicit `cls` parameter for static methods 2023-05-05 10:55:06 +02: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
rdb 5aad1d8404 interrogate: Change error message to mention interrogate
This makes it more obvious that the error is coming from interrogate when encountering a parse error in a build log
2022-11-29 20:14:33 +01:00
rdb 11746457ff interrogate: Fix invalid syntax for `make()` coerce ctor with kwargs
[skip ci]
2022-11-07 18:03:41 +01:00
rdb bb8b08a690 interrogatedb: Add `interrogate_wrapper_is_extension()` function 2022-10-20 10:09:45 +02:00
rdb 834be5c7a0 interrogate: Fix some badly formatted code 2022-10-10 15:10:53 +02:00
rdb e6036b5209 interrogatedb: More queries for function wrappers:
- `interrogate_wrapper_function(wrapper)`
- `interrogate_wrapper_is_copy_constructor(wrapper)`
- `interrogate_wrapper_is_coerce_constructor(wrapper)`
2022-10-10 15:09:28 +02:00
rdb 3d55945535 interrogatedb: Add new functions to interrogate_interface.h:
- `interrogate_function_is_constructor()`
- `interrogate_function_is_destructor()`
- `interrogate_wrapper_parameter_is_optional()`
- `interrogate_wrapper_parameter_is_scoped_enum()`
- `interrogate_wrapper_parameter_is_final()`

Only `interrogate_wrapper_parameter_is_optional()` requires a rebuild of the database with the new changes.
2022-05-10 15:58:34 +02:00
rdb 6ab6acfbaf interrogate: Do not write wrappers taking rvalue reference to interrogatedb
These are not actually exported by the Python binding generator anyway
2022-05-10 15:58:34 +02:00
rdb eab1308438 interrogate: Fix bug sorting overloads of AsyncFuture::set_result() 2021-03-01 10:59:02 +01:00
rdb 601ca323f5 interrogate: Support __truediv__, __floordiv__, etc. special methods 2021-02-22 18:13:34 +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 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 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 dabab90415 interrogate: Fix compilation error of bindings with Python 3.9+ 2020-09-12 22:50:03 +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 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 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
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
rdb 57ff1a5441 interrogate: remove vestigial code causing assert for C bindings
Fixes #722
2019-09-03 12:15:02 +02:00
rdb df8ccdb7ab Add support for Python 3.8 2019-08-13 17:48:32 +02:00
rdb e080d33e31 interrogate: temp hack to make encrypt_string return bytes
Fixes #684
2019-07-10 09:54:57 +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 3ca3dfd13a interrogate: fix in-place or (|=) operators (see #588) 2019-04-14 17:10:52 +02:00
rdb a634e729c8 interrogate: fix uninitialized var, fixes sporadic nb_true_divide
This was a regression introduced by fa6c066b2f (which in turn fixed #529)
2019-03-08 11:53:45 +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 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
Sam Edwards 818fdbd232 interrogate: Tidy up hash_string function
The main motivation behind this change is to get rid of a
signed integer overflow that sometimes happens in the prime
multiplication step, which is (per the C++ spec) undefined
behavior. However, it's probably for the best to use only
unsigned int when the function is clearly trying to avoid
negative values.

Not that I suspect it matters much, but I have also heavily
tested that the behavior of the function is unchanged (at
least on PC hardware - signed integer overflow doesn't
behave portably) although it may now be slightly faster due
to the fact that I have removed the floating-point math.
2018-12-30 04:21:34 -07:00
rdb a9d6d3be46 interrogate: refactor default argument handling 2018-12-26 22:47:14 +01:00
rdb 47188b47f6 interrogate: fix recording type of property in interrogatedb 2018-12-23 15:45:30 +01:00
rdb 256c8c5a23 interrogate: don't add space at end of command-line comment 2018-12-23 15:44:59 +01:00
rdb e32388c2f8 interrogate: fix crash reading static property 2018-11-24 22:44:09 +01:00
rdb 074c5187b0 Adopt new WindowProperties(size=(x, y), ...) short-hand
This is intended as replacement for WindowProperties.size(x, y), which is deprecated since it conflicts with the `size` property.  See #444.
2018-11-12 17:53:53 +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 b8ed9b1275 Remove pystub dependency from interrogate and friends 2018-11-06 21:49:17 +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