Commit Graph

2867 Commits

Author SHA1 Message Date
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 5e9c478b1a Raise version number to 1.10.2 on release/1.10.x branch
[skip ci]
2019-02-18 12:50:28 +01:00
rdb 80bb5c09fe Merge branch 'release/1.10.x' 2019-02-12 01:13:56 +01:00
rdb 5310945f4c py_panda: fix use of macro that was removed in Python 3.8 2019-02-11 23:36:30 +01:00
rdb 3df3b27a4e prc: prefer global-scope static MutexImpl over local one
MutexImpl guarantees nowadays to be initialized at constant init time, so this is safer on Windows, where we can't rely on magic statics.
2019-02-11 16:23:16 +01:00
rdb b466e77fe3 dtoolbase: make TypeRegistry lock statically initialized
This is possible now that all MutexImpl have a constexpr constructor.
2019-02-11 16:23:16 +01:00
rdb fb5191e812 pipeline: unify ConditionVarFull and ConditionVar
See #550.  Now that we use the Vista API for condition variables, the only place where the distinction is still relevant is Windows XP, and it's just not worth it for that one corner case.
2019-02-11 16:23:10 +01:00
rdb ab569916b1 Disable WinXP mutex emulation when _WIN32_WINNT >= 0x0600 2019-02-11 14:52:21 +01:00
rdb 89392f0e2d dtoolbase: new mutex and condition variable impl on Windows
This uses SRWLock on Vista and above, and uses a hand-rolled implementation on Windows XP that uses Events (and a spinlock, if this is a multi-core system).

Since SRWLocks aren't recursive, ReMutexWin32Impl has been added to implement recursive mutices, using old-fashioned critical sections.

MutexImpl now has a constexpr constructor on all implementations.
2019-02-07 00:20:59 +01:00
rdb 7e0952e367 parser-inc: add synchapi.h and winnt.h headers 2019-02-07 00:20:59 +01:00
rdb 36dd8889e7 Merge branch 'release/1.10.x' 2019-02-06 22:52:19 +01:00
rdb 666568a513 prc: fix recursive use of non-recursive mutex 2019-02-06 22:10:39 +01:00
rdb 86c266fd88 Merge branch 'release/1.10.x' 2019-01-31 00:58:29 +01:00
rdb 3a6f7fcde1 dtoolbase: docstring clarification for record_python_type
[skip ci]
2019-01-31 00:11:21 +01:00
rdb 1d9334f578 parser-inc: add atomic_int, etc. typedefs 2019-01-30 23:59:34 +01:00
rdb ffa0c74402 Merge branch 'release/1.10.x' 2019-01-26 20:18:02 +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
rdb 403e56817a dtoolbase: fix x86 compilation error on Android 2019-01-26 19:22:44 +01:00
rdb fc90ca7fdf Merge branch 'release/1.10.x' 2019-01-20 17:02:15 +01:00
Sam Edwards d961514892 CMake: Use string/list(APPEND foo ...) instead of set(foo ${foo} ...) 2019-01-19 17:01:36 -07:00
rdb ba4036e290 prc: clear error flag if loading deploy-ng blobinfo fails 2019-01-19 23:12:46 +01:00
rdb 6eca44464e load_dso: prevent load_dso_error() from returning old error
This happens if load_dso fails due to being unable to find the file, but not setting the dlerror flag and therefore causing a misleading error message to be shown.
2019-01-19 23:10:46 +01:00
Sam Edwards 8c4dfd7a70 CMake: Move compiler flag detection to its own file 2019-01-19 13:22:20 -07:00
Sam Edwards 0ff6787c1c CMake: Fix compatibility with CMake 3.0
`x GREATER_EQUAL y` wasn't added until 3.7, so
instead this uses `NOT x LESS y`
2019-01-13 13:00:56 -07:00
Sam Edwards 052004d06b CMake: Detect Opus 2019-01-13 12:04:48 -07:00
Sam Edwards 8a2375a5f1 CMake: Detect Ogg+Vorbis 2019-01-13 11:58:09 -07:00
Sam Edwards a0e12f4211 CMake: Use the SKIP_COMPOSITING flag on some files
Files excluded from compositing are (from makepanda):
dtool/src/dtoolbase/indent.cxx
panda/src/display/graphicsStateGuardian.cxx
panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx
panda/src/grutil/multitexReducer.cxx
panda/src/pgraph/nodePath.cxx
panda/src/pnmimage/convert_srgb_sse2.cxx (due to being compiled w/ SSE2)
2019-01-12 15:00:03 -07:00
rdb ba993aea0d Merge branch 'release/1.10.x' 2019-01-10 23:32:29 +01:00
rdb 84a1315104 More fixes to work around broken libc++ eof() in Mac OS X 10.7 2019-01-10 21:53:02 +01:00
Brian Lach 7c6e677a23 dtoolbase: add std::initializer_list constructors for pvector, epvector, pdeque, plist, pset, pmultiset
Closes #520
2019-01-10 01:42:44 +01:00
rdb 441e1e3d66 Bump version number on master to 1.11.0 2019-01-07 18:40:02 +01:00
Sam Edwards 654abdc5eb CMake: Detect when to set OPENCV_VER_23/OPENCV_VER_3 2019-01-06 15:37:14 -07:00
Sam Edwards 1a17808991 Merge branch 'master' into cmake 2019-01-06 15:37:07 -07:00
rdb 7132d09e7e Bump version to 1.10.1
[skip ci]
2019-01-06 09:34:55 +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 ad6cc0f21f CMake: Remove ALTERNATIVE_MALLOC
This apparently no longer does anything.
2019-01-03 02:30:38 -07:00
Sam Edwards ce4985a333 interrogatedb: Fix missing 'static' keyword 2019-01-02 10:18:59 -07:00
Sam Edwards d4df1b3762 Merge branch 'master' into cmake 2019-01-02 06:09:15 -07:00
rdb ac8be1a2e6 py_panda: fix int-to-enum conversion in Python 2
Fixes #498
2019-01-01 16:32:04 +01:00
rdb 0a43008313 py_panda: avoid duplicate symbol issues with LINK_ALL_STATIC
Fixes #478
2018-12-30 16:42:50 +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
Sam Edwards 3b194c75e4 Merge branch 'master' into cmake 2018-12-28 22:15:44 -07:00
Sam Edwards bddd7c1b4b CMake: Generate/install exported target sets 2018-12-27 17:39:22 -07:00
rdb 01915a36db Merge branch 'master' into deploy-ng 2018-12-26 23:41:50 +01:00
rdb a9d6d3be46 interrogate: refactor default argument handling 2018-12-26 22:47:14 +01:00
rdb a24c817144 interrogatedb: regenerate Python bindings 2018-12-23 15:46:09 +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 6df8aede1f interrogatedb: add interrogate_element_is_sequence/mapping 2018-12-23 15:44:01 +01:00
rdb 4c0fa1e75d Merge branch 'master' into deploy-ng 2018-12-16 22:36:45 +01:00
rdb 7995d483ab py_panda: make standard_type_members static and internal 2018-12-16 18:46:30 +01:00
rdb a7752da4f1 Merge branch 'master' into deploy-ng 2018-12-09 20:22:23 +01:00
rdb 825058805a dtoolutil: add GlobPattern::matches_file() and unit test
This is used similar to matches() but for file paths: it does not match slashes for * characters and has special support for /**/ and ignores // and /./ patterns.
2018-12-09 15:21:11 +01:00
Sam Edwards 99fee1a64d CMake: Assign COMPONENT and EXPORT to all targets 2018-12-06 17:48:44 -07:00
rdb c560c502b9 Merge branch 'master' into deploy-ng 2018-12-01 22:14:01 +01:00
rdb 7ed8b01a84 Merge branch 'input-overhaul' 2018-11-30 22:04:13 +01:00
rdb d7124d4df4 Merge branch 'master' into deploy-ng 2018-11-29 12:57:49 +01:00
Sam Edwards df805bd02b Merge branch 'master' into cmake 2018-11-28 21:54:58 -07:00
Sam Edwards 8df53698f4 CMake: Add missing .h/.I files that weren't getting installed 2018-11-28 16:13:05 -07:00
rdb 97d4e32a06 general: use nassert_raise instead of nassertv(false) et al
Even a brief error message in the assertion is infinitely more useful to a user who is not at home in the source code, especially for assertions that may reasonably be triggered by honest user mistakes.
2018-11-28 17:35:20 +01:00
rdb 32df05b528 Fix crash when unmounting/closing multifile while streams are open
It's not really reasonable to expect a user to find every occurrence of a cached resource that might be using an open stream and remove it or crash otherwise.

This is fixed by keeping the multifile stream open as long as any substreams are still pointing to it, using a simplified reference counting (care is taken not to fully make StreamWrapper reference-counted, since it's not in express and existing uses should not be broken).

Fixes #449
Also see #428
2018-11-27 21:19:38 +01:00
rdb 26fcf131c9 Merge branch 'master' into input-overhaul 2018-11-25 17:10:31 +01:00
rdb e32388c2f8 interrogate: fix crash reading static property 2018-11-24 22:44:09 +01:00
Sam Edwards 7f8d7366dc CMake: Update for upstream Interrogate changes
- "igateruntime" is no longer a thing
- interrogate_module embeds a preamble; we have to provide it
- WindowProperties now has an extension
2018-11-12 19:16:28 -07:00
Sam Edwards 1ae736f881 CMake: Detect and build support for Assimp 2018-11-12 15:49:08 -07:00
Sam Edwards 6b26889e7e Merge branch 'master' into cmake 2018-11-12 15:41:42 -07:00
rdb 3d7fcf2ce9 Merge branch 'master' into deploy-ng 2018-11-12 18:31:43 +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
Sam Edwards c3f9fdf778 CMake: Organize Package.cmake a bit better 2018-11-09 17:46:03 -07:00
rdb 0581e414a4 parser-inc: remove patchlevel.h include from Python.h 2018-11-09 11:40:11 +01:00
rdb 5ba09ec5a0 interrogate: fix compile error when building with LINK_ALL_STATIC
Fixes #442
2018-11-09 11:38:41 +01:00
Sam Edwards 1a80b69fb1 CMake: Clean out a few old TODOs and comments 2018-11-09 01:57:40 -07:00
Sam Edwards 2b1554a44c CMake: Rename "config_package" function to "package_status"
The latter name is more consistent with what it does:
indicates the status/purpose/options of the package to
the user.
2018-11-08 21:15:00 -07:00
Sam Edwards d43767c617 CMake: Find OpenEXR, support it in pnmimagetypes 2018-11-07 19:56:01 -07:00
rdb cf65010a54 Merge branch 'master' into deploy-ng 2018-11-06 23:40:24 +01:00
rdb 70bfe21a63 Merge branch 'master' into input-overhaul 2018-11-06 22:10:39 +01:00
rdb b8ed9b1275 Remove pystub dependency from interrogate and friends 2018-11-06 21:49:17 +01:00
rdb 6e8cb98861 dtoolbase: fix compile errors with --no-python 2018-11-06 20:32:37 +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 b13c4fb8d1 pystub: add a few more calls 2018-11-05 22:14:20 +01:00
rdb 23bb814f3f Merge branch 'master' into deploy-ng 2018-11-04 15:26:58 +01:00
Sam Edwards e604d71fbc CMake: Don't build p3dconfig anymore
dconfig.cxx was recently deleted.

p3dconfig is now just an interface library, since it still
contains a header which we'd like on the search path of
libraries that use it.
2018-11-03 23:46:34 -06:00
Sam Edwards a6877a6def Merge branch 'master' into cmake 2018-11-03 22:55:13 -06:00
Sam Edwards 0b91b3eeb3 vrpn: Add VRPN headers to parser-inc, remove CPPPARSER workarounds 2018-11-03 22:51:32 -06:00
Sam Edwards 9222bc6d31 CMake: Detect OpenCV/ARToolKit, build p3vision
For now, p3vision is only built if either OpenCV or
ARToolKit is available. It does contain some generic
webcam access code, so it might be worth building it
when that's available.
2018-11-03 22:51:14 -06:00
rdb a799bcaec9 Merge branch 'master' into deploy-ng 2018-11-03 22:51:32 +01:00
Sam Edwards 15a78c55bc CMake: Detect and use HarfBuzz when available 2018-11-02 23:37:26 -06:00
rdb 5ac3cf3fc6 Eliminate C++ DConfig; replace it with a Python compatibility shim 2018-11-02 23:27:07 +01:00
Sam Edwards 62f7aabe91 Merge branch 'master' into cmake 2018-11-01 22:33:04 -06:00
Sam Edwards 5b973ed837 CMake: Add DirectX 9 support 2018-11-01 22:33:01 -06:00
Sam Edwards 7c42b75ac8 CMake: Update FindCg to discover cgD3D9
This also means renaming "CGDX9" to "CGD3D9" for consistency
with what Nvidia calls it.
2018-11-01 16:31:57 -06:00
rdb 357b6d3093 Merge branch 'master' into input-overhaul 2018-10-29 23:40:46 +01:00
rdb ad3b145951 interrogate: generated property getter should copy in some cases
This is to fix eg. public ButtonHandle members from being returned as const reference, which means they won't outlive the struct they are accessed on, a recipe for obscure crashes.

The is_trivial() criterium for this to apply is admittedly really arbitrary; I haven't really figured out what the right criterium should be, but it's better than hardcoding ButtonHandle.
2018-10-29 16:08:29 -06:00
rdb 2ed4cd7ce6 cppparser: fix CPPStructType::is_trivial() for eg. ButtonHandle 2018-10-29 16:08:29 -06:00
Sam Edwards 58c065d970 Merge branch 'master' into cmake 2018-10-28 05:11:14 -06:00
Sam Edwards 11a75eab99 CMake: Build OpenGL ES (1&2) display modules
Also reorganizes Package.cmake a little, getting more of the
package discovery logic under the PackageConfig.cmake system.
2018-10-22 01:58:24 -06:00
Sam Edwards a585dcf9ad CMake: Streamline THREADS configuration
In particular this uses Threads::Threads (when available)
to let CMake figure out how to link against pthread/etc.
2018-10-19 17:39:36 -06:00