Commit Graph

218 Commits

Author SHA1 Message Date
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
rdb 01915a36db Merge branch 'master' into deploy-ng 2018-12-26 23:41:50 +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 3d7fcf2ce9 Merge branch 'master' into deploy-ng 2018-11-12 18:31:43 +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 cf65010a54 Merge branch 'master' into deploy-ng 2018-11-06 23:40:24 +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
Mitchell Stokes b16f9f8f4f Merge branch 'master' into deploy-ng 2018-10-18 17:58:21 -07:00
loblao e67d2a16c1
Dtool_PyModuleInitHelper: Fix segfault 2018-10-18 12:14:20 -03:00
rdb 9da335ac42 Merge branch 'master' into deploy-ng 2018-10-16 23:02:19 +02:00
rdb 90cc8fe385 Fix building with SIMPLE_THREADS=1 2018-10-16 22:15:36 +02:00
rdb c28045990c Merge branch 'master' into deploy-ng 2018-10-15 15:42:48 +02:00
rdb 8375340582 py_panda: fix TypeError being raised instead of AttributeError
This prevented doing something like hasattr(vec3, "stuff")
2018-10-07 20:24:19 +02:00
Mitchell Stokes e4cf73378c Merge remote-tracking branch 'origin/master' into deploy-ng 2018-07-15 14:38:05 -07:00
rdb 68e7f681f4 interrogate: support enum class to limited extent in Python 2
Only the basics are supported; the __members__ or iter interface is not supported at this time.

See also #351 for discussion on pulling in enum34 module.
2018-07-02 12:16:35 +02:00
rdb b2c04a8c7a interrogate: support scoped enum args and return values 2018-06-30 21:38:40 +02:00
rdb 0367c73026 py_panda: fix leak of reference counted class with inaccessible dtor
If a class inherits from ReferenceCount, it can be destructed by downcasting to ReferenceCount, so it should not be an obstacle to properly clean it up when such a class is returned from C++.

This issue comes up when a CycleData is returned via MemoryUsagePointers, which is not exposed so is wrapped as NodeReferenceCount instead, which has a protected destructor.
2018-06-22 20:49:19 +02:00
rdb 886e1c2f16 general: fix many compilation warnings in GCC 8 2018-06-19 00:37:28 +02:00
Sam Edwards b2bfb31114 general: Remove `using std::*` from headers
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.

Closes #350
Closes #335
2018-06-14 16:04:49 +02:00
rdb 1c476203fc interrogate: remove Dtool_AddToDictionary (let me know if anyone uses this)
If any code is relying on this, please let me know and I will add it back.  It appears to be redundant, though, since one can access DtoolClassDict directly.

Symbol kept around temporarily in order to keep ABI compatibility for a short while as people may not update their interrogate and Panda in sync, but it can soon be removed.
2018-06-11 13:43:30 +02:00
rdb 3cc88cd304 interrogate: clean up py_panda.h a bit more
Inching towards reducing code in py_panda and eventually having no Python-specific code in interrogatedb anymore.
2018-06-11 13:39:45 +02:00
Sam Edwards 7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +02:00
Sam Edwards 5e82671084 general: Do away with TYPENAME macro 2018-06-03 16:36:34 -06:00
Sam Edwards e2b4353800 general: Replace NULL (and 0 as pointer) with C++11 nullptr
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
rdb e0245d2777 First step towards eliminating `using namespace std;` (#335) 2018-06-03 20:32:23 +02:00
rdb 21d8c29645 More warning fixes 2018-06-03 06:45:35 -04:00
rdb db5dd98d33 general: further warning fixes, use -Wno-unused-variable if NDEBUG
Disabling unused variable checking is needed in NDEBUG builds because of the heavy use of temporary variables in asserts.
2018-05-30 22:51:04 +02:00
rdb b0cece7faf Merge branch 'master' into deploy-ng 2018-04-08 15:44:32 +02:00
rdb 84915073e1 Fix compilation warning on MSVC 2015 2018-03-30 20:15:13 +02:00
rdb f535a641e4 Merge branch 'master' into deploy-ng 2018-02-27 20:53:28 +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
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 c911ba8059 Merge branch 'master' of github.com:panda3d/panda3d into deploy-ng 2017-12-21 15:10:53 +01:00
rdb f703fd51ed deploy-ng: allow deploy-stub to set MAIN_DIR via blobinfo 2017-12-21 12:25:17 +01:00
rdb 193e4b5f59 interrogate: clean py_panda.h; use macros to access Dtool_PyInstDef 2017-12-12 23:03:38 +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 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 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 96d237377b interrogate: add various sequence/mapping methods to seq/map property 2017-11-05 18:01:39 +01:00
rdb 0c0f9adab9 Support coroutines and async/await in the task manager and loader 2017-10-31 18:56:41 +01:00
rdb 464cd5fc8b Replace __builtin_expect macros with LIKELY/UNLIKELY 2017-10-09 00:22:28 +02:00
rdb bf190f7306 interrogate: support MAKE_MAP_PROPERTY 2017-10-09 00:02:46 +02:00