mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
special case luabridge for windows/MSVC
luabridge uses static fn addresses to identify classes. Windows uses different addresses for *identical* static functions in libardour.dll and ardour.exe This solves the issue by moving the all functions from a header-only implementation into libardour.
This commit is contained in:
parent
4eba3869fe
commit
8002b2d26e
4 changed files with 112 additions and 7 deletions
|
|
@ -36,6 +36,15 @@ template <class T>
|
|||
class ClassInfo
|
||||
{
|
||||
public:
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
/* static symbols on windows (even identical symbols) are not
|
||||
* mapped to the same address when mixing .dll + .exe.
|
||||
* the implementation is moved to libardour/gtk2_ardour.
|
||||
*/
|
||||
static void const* getStaticKey ();
|
||||
static void const* getClassKey ();
|
||||
static void const* getConstKey ();
|
||||
#else
|
||||
/** Get the key for the static table.
|
||||
|
||||
The static table holds the static data members, static properties, and
|
||||
|
|
@ -69,5 +78,6 @@ public:
|
|||
static char value;
|
||||
return &value;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -51,11 +51,15 @@
|
|||
6. Our metatables have "__metatable" set to a boolean = false.
|
||||
7. Our lightuserdata is unique.
|
||||
*/
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
extern void* getIdentityKey ();
|
||||
#else
|
||||
inline void* getIdentityKey ()
|
||||
{
|
||||
static char value;
|
||||
return &value;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
Interface to a class pointer retrievable from a userdata.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue