Commit Graph

2313 Commits

Author SHA1 Message Date
rdb d13464104c Fix compilation issue with --nothing on MSVC
I have no idea why this error happens, but it does not seem worth the effort to investigate further, so I'm just reverting the previous change to this file.
2018-04-06 20:50:31 +02:00
rdb 7125a3e587 interrogate: allow passing None for args that have NULL as default value 2018-04-05 20:49:13 +02:00
rdb 552a649ef3 interrogate: add back NULL definition, fixes some keyword arguments
I am not sure why the definition of NULL was removed; it might have been by mistake, but in any case it broke code like this:

    img = PNMImage(w, h, color_space=CS_srgb)

since it would not understand the default value (NULL) for the argument preceding color_space.
2018-04-04 21:50:02 +02:00
rdb e9ae7dcc40 Use vector_uchar instead of string for binary network/file data
This distinction allows us to better support Python 3, since it will raise exceptions when trying to put arbitrary binary data in a str object.

This also adds some convenience functions for efficiently initializing a Datagram or PTA_uchar from a vector_uchar.
2018-04-02 23:17:14 +02:00
rdb 84915073e1 Fix compilation warning on MSVC 2015 2018-03-30 20:15:13 +02:00
Sam Edwards 9dd37e9dbc general: Add guards to ensure proper BUILDING_ macros defined
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
2018-03-25 13:17:52 -06:00
Sam Edwards bd2a9d709a dtoolbase: Introduce BUILDING_ defines for each component
This mirrors the prior commit.
2018-03-25 13:17:52 -06:00
Sam Edwards 9739923593 dconfig: Change export macros to EXP*_DTOOL_DCONFIG
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards 775fcb5b0b prc: Change export macros to EXP*_DTOOL_PRC
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards ad5b45811d dtoolutil: Change export macros to EXP*_DTOOL_DTOOLUTIL
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards 9852ada792 dtoolbase: Change export macros to EXP*_DTOOL_DTOOLBASE
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards cfd70ebead general: Remove '#pragma interface'/'#pragma implementation'
The GCC documentation states that, as of GCC 2.7.2, these aren't
necessary for proper program behavior. The documentation further
discourages their use because they don't suppress unnecessary code
duplication.

The Panda codebase these days uses "extern template class" instead,
which tells the compiler not to perform implicit template expansion
because an explicit template expansion is available for linking
elsewhere in the program. This is a more compiler-neutral way of
achieving the same thing as '#pragma interface', making
'#pragma interface' not only redundant, it could also mask problems
in the "extern template class" machinery.
2018-03-20 14:36:19 -04:00
Sam Edwards a4c1b44371 dtoolbase: Remove EXPORT_TEMPLATES define
As of f69354d9fa, this is just always
expected on all platforms. If it's not defined,
TemplateClass<X>::_type_handle won't link correctly with some compilers
(e.g. Clang) and the lack of 'extern template class' will result in
duplicated code in any case. In short, turning it off causes problems.

makepanda also always turns this on, so it doesn't represent any
optional feature or autodetected platform-specific behavior anyway.
2018-03-20 14:36:19 -04:00
rdb 766b38fb7a dtoolbase: make TypeHandle a constexpr class 2018-03-08 12:58:16 +01:00
Sam Edwards ebe9e75d84 dtoolbase: Delete unused preprocessor macro
[skip ci]
2018-03-04 20:28:51 -07:00
Sam Edwards 013af2ac4b dtool: Delete 'newheader'
This is a task better handled by editors/scripts.

[skip ci]
2018-03-04 20:28:09 -07:00
rdb 8b6616814d interrogate_module: warn about circular dependencies between classes
This will help us catch cases wherein we inadvertently create a circular dependency between component libraries.  Right now it only checks inheritance and typedefs, but this can be expanded in the future.

Also, sorts the module initialization by dependency topology.  This isn't very important right now, but having this guarantee might help when refactoring module initialization in the future.
2018-02-27 20:23:36 +01:00
rdb bdb575e766 interrogatedb: add interrogate_type_is_global (+regenerate pydtool) 2018-02-27 19:44:14 +01:00
rdb 162b86c6d9 interrogatedb: fix library name setting for typedefs
Typedefs are evidently always considered "fully defined", so we need to add another condition to the database merging code to prefer the type that is marked "global" when merging two types.
2018-02-27 19:33:18 +01:00
rdb fa231664bd interrogate: don't mark base types as global 2018-02-27 18:47:51 +01:00
rdb 2450f31ef5 interrogate: remove deprecated and unneeded downcastTo*() functions
They have not been needed for a very long time, and they create an awkward reverse dependency of base classes on derived classes.
2018-02-27 15:06:12 +01:00
Sam Edwards 705fd445f3 dtool: Fix an inconsistent EXPCL/EXPTP 2018-02-26 00:03:09 -07:00
Sam Edwards c3106411f5 dtool: Remove 'attach'
See #244 for discussion. It's really old, hasn't been used in almost
a decade, and doesn't support the current Git workflow either.
2018-02-25 18:27:10 -07:00
Sam Edwards 68b1ecfd32 parser-inc: Add stub for FFTW3 header 2018-02-17 23:31:08 -07:00
Sam Edwards ab7dbebf3f general: Remove lingering references to Helix
Support for Helix has been dropped long ago; it's very unlikely to return.
See also de4280ea20.
2018-02-14 17:26:35 -07:00
rdb 730279531a makepanda: build on Intel Android machines 2018-02-10 12:13:05 +01:00
rdb d269f7c6c3 android: allow stdout/stderr capture using extra field on intent
This allows launching the Panda apk from termux and getting command-line output back to termux.
2018-02-06 22:42:40 +01:00
Sam Edwards fb6c92cf08 express: Move all vector_* types to dtoolutil 2018-02-04 17:12:03 -07:00
Sam Edwards fbe373dfdc general: Fix includes 2018-02-04 17:11:55 -07:00
Sam Edwards 0d079e2b80 general: Remove execute modes from ordinary text files 2018-02-04 17:11:43 -07:00
rdb 7c1dd4050b android: change assets mount dir, point binary path to .apk
The binary path we get from /proc/self/exe isn't very useful; the path to the .apk is barely more useful but it still doesn't make a whole lot of sense.  It might make more sense to set it to the path of the native .so that is being loaded by NativeActivity.
2018-01-29 19:44:39 +01:00
rdb e301e5fe5e android: fix various compilation errors 2018-01-29 19:36:51 +01:00
rdb 60a572f88a android: some changes for building on Android:
- allow setting API target with --target=android-21
 - always link to libpython on Android, seems to be necessary
 - support aarch64 (arm64-v8 ABI) architecture
 - enable building on an Android machine (tested in termux)

[skip ci]
2018-01-28 14:24:51 +01:00
rdb 193e4b5f59 interrogate: clean py_panda.h; use macros to access Dtool_PyInstDef 2017-12-12 23:03:38 +01:00
rdb 18678214ae interrogate: pass "args" tuple to function that takes PyObject *args 2017-12-12 16:20:59 +01:00
rdb f54b8be676 Separate out Python compat hacks from py_panda.h into py_compat.h 2017-12-03 15:48:02 +01:00
Younguk Kim 3abf3a0c88 Add HAVE_PYTHON macro to build without python 2017-11-28 13:04:57 +09:00
rdb 27f20c80fd Don't include dlmalloc_src.cxx in interrogate
Fixes: #200
2017-11-27 18:49:28 +01:00
rdb 69b3468b2c interrogate: more improvements to seq/map wrappers
Gets rid of properties defined as both MAKE_SEQ_PROPERTY/MAKE_MAP_PROPERTY, which are just a bad idea. Instead, adds a way for map properties to define a separate "keys" interface.

Fixes: #203
2017-11-27 17:29:50 +01:00
rdb 404842e70b interrogate: fix warning message caused by erroneously wrapped remap
Fixes: #191
2017-11-11 20:36:58 +01:00
rdb b8bf8bd641 interrogate: fix crash when calling functions returning TypedWritable 2017-11-08 00:04:00 +01:00
rdb 1b1d80cd27 More thoroughly fix issues with pickling Panda objects in Python 3
This also adds DatagramBuffer, a class for writing datagrams to memory and reading them from there again.
2017-11-08 00:02:35 +01:00
rdb 08629ef1a0 Fix a few compiler warnings 2017-11-07 15:38:40 +01:00
rdb 483a491ed7 interrogate: simplify coercion code
This remove support for coercing non-ReferenceCounted types that are neither default-constructible nor move-assignable, but it turns out none of the classes we really need it for matches that.
It further cuts down on the amount of code that is being generated to support coercion in cases where it makes absolutely no sense.
2017-11-06 19:53:38 +01:00
rdb dd2806c8bd Mark constructors 'explicit' for which coercion makes no sense 2017-11-06 19:47:38 +01:00
rdb 96d237377b interrogate: add various sequence/mapping methods to seq/map property 2017-11-05 18:01:39 +01:00
frainfreeze f22c0cdd83 Add README.md files for various directories
Closes: #10
2017-10-31 19:20:24 +01:00
rdb 0c0f9adab9 Support coroutines and async/await in the task manager and loader 2017-10-31 18:56:41 +01:00
rdb dee8d83998 interrogate: fix regression with setter of MAKE_PROPERTY2
See also tobspr/RenderPipeline#86
2017-10-17 21:18:51 +02:00
rdb 51d948a7fa Support compilation for Python 3.7 2017-10-13 12:40:47 +02:00