mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
dtoolbase: Change export macros to EXP*_DTOOL_DTOOLBASE
This is for consistency with `panda`, which follows this format.
This commit is contained in:
parent
29318992d9
commit
9852ada792
@ -23,7 +23,7 @@
|
||||
* of static functions, which are used to wrap calls to Bob Jenkins' public-
|
||||
* domain hash generation function (defined in lookup3.c).
|
||||
*/
|
||||
class EXPCL_DTOOL AddHash {
|
||||
class EXPCL_DTOOL_DTOOLBASE AddHash {
|
||||
public:
|
||||
INLINE static size_t add_hash(size_t start, const uint32_t *words, size_t num_words);
|
||||
static size_t add_hash(size_t start, const uint8_t *bytes, size_t num_bytes);
|
||||
|
@ -24,7 +24,7 @@
|
||||
* require multiprogramming, and therefore don't require special atomic
|
||||
* operations.
|
||||
*/
|
||||
class EXPCL_DTOOL AtomicAdjustDummyImpl {
|
||||
class EXPCL_DTOOL_DTOOLBASE AtomicAdjustDummyImpl {
|
||||
public:
|
||||
typedef long Integer;
|
||||
typedef void *Pointer;
|
||||
|
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* Uses GCC built-ins to implement atomic adjustments.
|
||||
*/
|
||||
class EXPCL_DTOOL AtomicAdjustGccImpl {
|
||||
class EXPCL_DTOOL_DTOOLBASE AtomicAdjustGccImpl {
|
||||
public:
|
||||
#if __GCC_ATOMIC_LONG_LOCK_FREE >= __GCC_ATOMIC_INT_LOCK_FREE
|
||||
// If the long can be more lock-free than int, use it instead.
|
||||
|
@ -26,7 +26,7 @@
|
||||
* Although this class is named i386, it actually uses instructions that are
|
||||
* specific to 486 and higher.
|
||||
*/
|
||||
class EXPCL_DTOOL AtomicAdjustI386Impl {
|
||||
class EXPCL_DTOOL_DTOOLBASE AtomicAdjustI386Impl {
|
||||
public:
|
||||
typedef ALIGN_4BYTE int32_t Integer;
|
||||
typedef void *UnalignedPointer;
|
||||
|
@ -26,7 +26,7 @@
|
||||
/**
|
||||
* Uses POSIX to implement atomic adjustments.
|
||||
*/
|
||||
class EXPCL_DTOOL AtomicAdjustPosixImpl {
|
||||
class EXPCL_DTOOL_DTOOLBASE AtomicAdjustPosixImpl {
|
||||
public:
|
||||
// In Posix, "long" is generally the native word size (32- or 64-bit), which
|
||||
// is what we'd prefer.
|
||||
|
@ -29,7 +29,7 @@
|
||||
/**
|
||||
* Uses Windows native calls to implement atomic adjustments.
|
||||
*/
|
||||
class EXPCL_DTOOL AtomicAdjustWin32Impl {
|
||||
class EXPCL_DTOOL_DTOOLBASE AtomicAdjustWin32Impl {
|
||||
public:
|
||||
#ifdef _WIN64
|
||||
// For 64-bit builds, we'd prefer to use a 64-bit integer.
|
||||
|
@ -55,7 +55,7 @@ enum DeletedChainFlag {
|
||||
*
|
||||
* Use MemoryHook to get a new DeletedBufferChain of a particular size.
|
||||
*/
|
||||
class EXPCL_DTOOL DeletedBufferChain {
|
||||
class EXPCL_DTOOL_DTOOLBASE DeletedBufferChain {
|
||||
protected:
|
||||
DeletedBufferChain(size_t buffer_size);
|
||||
|
||||
|
@ -282,8 +282,8 @@ class ReferenceCount;
|
||||
// We need a pointer to a global MemoryHook object, to manage all malloc and
|
||||
// free requests from Panda. See the comments in MemoryHook itself.
|
||||
class MemoryHook;
|
||||
EXPCL_DTOOL extern MemoryHook *memory_hook;
|
||||
EXPCL_DTOOL void init_memory_hook();
|
||||
EXPCL_DTOOL_DTOOLBASE extern MemoryHook *memory_hook;
|
||||
EXPCL_DTOOL_DTOOLBASE void init_memory_hook();
|
||||
|
||||
// Now redefine some handy macros to hook into the above MemoryHook object.
|
||||
#ifndef USE_MEMORY_NOWRAPPERS
|
||||
@ -303,8 +303,8 @@ EXPCL_DTOOL void init_memory_hook();
|
||||
#if defined(HAVE_THREADS) && defined(SIMPLE_THREADS)
|
||||
// We need another forward-reference function to allow low-level code to
|
||||
// cooperatively yield the timeslice, in SIMPLE_THREADS mode.
|
||||
extern EXPCL_DTOOL void (*global_thread_yield)();
|
||||
extern EXPCL_DTOOL void (*global_thread_consider_yield)();
|
||||
extern EXPCL_DTOOL_DTOOLBASE void (*global_thread_yield)();
|
||||
extern EXPCL_DTOOL_DTOOLBASE void (*global_thread_consider_yield)();
|
||||
|
||||
INLINE void thread_yield() {
|
||||
(*global_thread_yield)();
|
||||
@ -324,8 +324,8 @@ INLINE void thread_consider_yield() {
|
||||
|
||||
#if defined(USE_TAU) && defined(WIN32)
|
||||
// Hack around tau's lack of DLL export declarations for Profiler class.
|
||||
extern EXPCL_DTOOL bool __tau_shutdown;
|
||||
class EXPCL_DTOOL TauProfile {
|
||||
extern EXPCL_DTOOL_DTOOLBASE bool __tau_shutdown;
|
||||
class EXPCL_DTOOL_DTOOLBASE TauProfile {
|
||||
public:
|
||||
TauProfile(void *&tautimer, char *name, char *type, int group, char *group_name) {
|
||||
Tau_profile_c_timer(&tautimer, name, type, group, group_name);
|
||||
|
@ -99,6 +99,11 @@
|
||||
#define EXPTP_MISC IMPORT_TEMPL
|
||||
#endif /* BUILDING_MISC */
|
||||
|
||||
|
||||
#define EXPCL_DTOOL_DTOOLBASE EXPCL_DTOOL
|
||||
#define EXPTP_DTOOL_DTOOLBASE EXPTP_DTOOL
|
||||
|
||||
|
||||
/* These two are always defined empty, because pystub is statically
|
||||
built. But we leave the symbol around in case we change our minds
|
||||
to make pystub once again be a dynamic library. */
|
||||
|
@ -22,7 +22,7 @@
|
||||
* stream itself. Useful for indenting a series of lines of text by a given
|
||||
* amount.
|
||||
*/
|
||||
EXPCL_DTOOL ostream &
|
||||
EXPCL_DTOOL_DTOOLBASE ostream &
|
||||
indent(ostream &out, int indent_level);
|
||||
|
||||
/**
|
||||
|
@ -21,7 +21,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
EXPCL_DTOOL uint32_t hashword(const uint32_t *k, /* the key, an array of uint32_t values */
|
||||
EXPCL_DTOOL_DTOOLBASE uint32_t hashword(const uint32_t *k, /* the key, an array of uint32_t values */
|
||||
size_t length, /* the length of the key, in uint32_ts */
|
||||
uint32_t initval);
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
* that seems to cause problems when including header files for C++-based
|
||||
* system libraries (such as are found on OSX).
|
||||
*/
|
||||
class EXPCL_DTOOL MemoryBase {
|
||||
class EXPCL_DTOOL_DTOOLBASE MemoryBase {
|
||||
public:
|
||||
ALLOC_MEMORY_BASE;
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ class DeletedBufferChain;
|
||||
* employed for classes which inherit from MemoryBase; otherwise, use the
|
||||
* PANDA_MALLOC macros.)
|
||||
*/
|
||||
class EXPCL_DTOOL MemoryHook {
|
||||
class EXPCL_DTOOL_DTOOLBASE MemoryHook {
|
||||
public:
|
||||
MemoryHook();
|
||||
MemoryHook(const MemoryHook ©);
|
||||
|
@ -21,7 +21,7 @@
|
||||
* A fake mutex implementation for single-threaded applications that don't
|
||||
* need any synchronization control. This does nothing at all.
|
||||
*/
|
||||
class EXPCL_DTOOL MutexDummyImpl {
|
||||
class EXPCL_DTOOL_DTOOLBASE MutexDummyImpl {
|
||||
public:
|
||||
CONSTEXPR MutexDummyImpl() DEFAULT_CTOR;
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
/**
|
||||
* Uses Posix threads to implement a mutex.
|
||||
*/
|
||||
class EXPCL_DTOOL MutexPosixImpl {
|
||||
class EXPCL_DTOOL_DTOOLBASE MutexPosixImpl {
|
||||
public:
|
||||
CONSTEXPR MutexPosixImpl() NOEXCEPT;
|
||||
INLINE ~MutexPosixImpl();
|
||||
@ -50,7 +50,7 @@ private:
|
||||
/**
|
||||
* Uses Posix threads to implement a reentrant mutex.
|
||||
*/
|
||||
class EXPCL_DTOOL ReMutexPosixImpl {
|
||||
class EXPCL_DTOOL_DTOOLBASE ReMutexPosixImpl {
|
||||
public:
|
||||
#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
||||
CONSTEXPR ReMutexPosixImpl() NOEXCEPT;
|
||||
|
@ -27,7 +27,7 @@
|
||||
* specific application on a specific SMP machine, and you are confident that
|
||||
* you have at least as many CPU's as you have threads.
|
||||
*/
|
||||
class EXPCL_DTOOL MutexSpinlockImpl {
|
||||
class EXPCL_DTOOL_DTOOLBASE MutexSpinlockImpl {
|
||||
public:
|
||||
CONSTEXPR MutexSpinlockImpl();
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
/**
|
||||
* Uses Windows native calls to implement a mutex.
|
||||
*/
|
||||
class EXPCL_DTOOL MutexWin32Impl {
|
||||
class EXPCL_DTOOL_DTOOLBASE MutexWin32Impl {
|
||||
public:
|
||||
MutexWin32Impl();
|
||||
INLINE ~MutexWin32Impl();
|
||||
|
@ -29,7 +29,7 @@
|
||||
* since this will help reduce fragmentation problems in the dynamic heap.
|
||||
* Also, memory allocated from here will exhibit less wasted space.
|
||||
*/
|
||||
class EXPCL_DTOOL NeverFreeMemory {
|
||||
class EXPCL_DTOOL_DTOOLBASE NeverFreeMemory {
|
||||
private:
|
||||
NeverFreeMemory();
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
EXPCL_DTOOL void pdtoa(double value, char *buffer);
|
||||
EXPCL_DTOOL_DTOOLBASE void pdtoa(double value, char *buffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}; /* end of extern "C" */
|
||||
|
@ -20,10 +20,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
EXPCL_DTOOL double
|
||||
EXPCL_DTOOL_DTOOLBASE double
|
||||
pstrtod(const char *nptr, char **endptr);
|
||||
|
||||
EXPCL_DTOOL double
|
||||
EXPCL_DTOOL_DTOOLBASE double
|
||||
patof(const char *str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -76,18 +76,18 @@ register_dynamic_type(const string &name,
|
||||
|
||||
|
||||
// A few system-wide TypeHandles are defined for some basic types.
|
||||
extern TypeHandle EXPCL_DTOOL long_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL int_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL uint_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL short_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL ushort_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL char_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL uchar_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL bool_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL double_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL float_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL string_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL wstring_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE long_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE int_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE uint_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE short_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE ushort_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE char_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE uchar_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE bool_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE double_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE float_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE string_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE wstring_type_handle;
|
||||
|
||||
extern TypeHandle long_p_type_handle;
|
||||
extern TypeHandle int_p_type_handle;
|
||||
@ -98,14 +98,14 @@ extern TypeHandle double_p_type_handle;
|
||||
extern TypeHandle float_p_type_handle;
|
||||
extern TypeHandle void_p_type_handle;
|
||||
|
||||
extern TypeHandle EXPCL_DTOOL pvector_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL ov_set_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL pdeque_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL plist_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL pmap_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL pset_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE pvector_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE ov_set_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE pdeque_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE plist_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE pmap_type_handle;
|
||||
extern TypeHandle EXPCL_DTOOL_DTOOLBASE pset_type_handle;
|
||||
|
||||
void EXPCL_DTOOL init_system_type_handles();
|
||||
void EXPCL_DTOOL_DTOOLBASE init_system_type_handles();
|
||||
|
||||
// The following template function and its specializations will return a
|
||||
// TypeHandle for any type in the world, from a pointer to that type.
|
||||
|
@ -78,7 +78,7 @@ class TypedObject;
|
||||
* that ancestry of a particular type may be queried, and the type name may be
|
||||
* retrieved for run-time display.
|
||||
*/
|
||||
class EXPCL_DTOOL TypeHandle FINAL {
|
||||
class EXPCL_DTOOL_DTOOLBASE TypeHandle FINAL {
|
||||
PUBLISHED:
|
||||
TypeHandle() NOEXCEPT DEFAULT_CTOR;
|
||||
|
||||
@ -162,7 +162,7 @@ INLINE ostream &operator << (ostream &out, TypeHandle type) {
|
||||
return out;
|
||||
}
|
||||
|
||||
EXPCL_DTOOL ostream &operator << (ostream &out, TypeHandle::MemoryClass mem_class);
|
||||
EXPCL_DTOOL_DTOOLBASE ostream &operator << (ostream &out, TypeHandle::MemoryClass mem_class);
|
||||
|
||||
// We must include typeRegistry at this point so we can call it from our
|
||||
// inline functions. This is a circular include that is strategically placed
|
||||
|
@ -33,7 +33,7 @@ class TypedObject;
|
||||
* should be migrated to shared memory as soon as shared memory becomes
|
||||
* available.
|
||||
*/
|
||||
class EXPCL_DTOOL TypeRegistry : public MemoryBase {
|
||||
class EXPCL_DTOOL_DTOOLBASE TypeRegistry : public MemoryBase {
|
||||
public:
|
||||
// User code shouldn't generally need to call TypeRegistry::register_type()
|
||||
// or record_derivation() directly; instead, use the register_type
|
||||
@ -118,7 +118,7 @@ private:
|
||||
};
|
||||
|
||||
// Helper function to allow for "C" interaction into the type system
|
||||
extern "C" EXPCL_DTOOL int get_best_parent_from_Set(int id, const std::set<int> &this_set);
|
||||
extern "C" EXPCL_DTOOL_DTOOLBASE int get_best_parent_from_Set(int id, const std::set<int> &this_set);
|
||||
|
||||
#include "typeHandle.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
* directly access this class; this class is hidden within the TypeRegistry
|
||||
* accessors.
|
||||
*/
|
||||
class EXPCL_DTOOL TypeRegistryNode {
|
||||
class EXPCL_DTOOL_DTOOLBASE TypeRegistryNode {
|
||||
public:
|
||||
TypeRegistryNode(TypeHandle handle, const string &name, TypeHandle &ref);
|
||||
|
||||
|
@ -85,7 +85,7 @@
|
||||
* }
|
||||
* @endcode
|
||||
*/
|
||||
class EXPCL_DTOOL TypedObject : public MemoryBase {
|
||||
class EXPCL_DTOOL_DTOOLBASE TypedObject : public MemoryBase {
|
||||
public:
|
||||
INLINE TypedObject() DEFAULT_CTOR;
|
||||
INLINE TypedObject(const TypedObject ©) DEFAULT_CTOR;
|
||||
|
Loading…
x
Reference in New Issue
Block a user