Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Scripting update proposal
(1/1)
comsytec:
Hello
Can I propose this change in sqplus.h :
from:
--- Code: ---// === Class Type Helper class: returns a unique number for each class type ===
template<typename T>
struct ClassType {
static SQUserPointer type(void) { return (SQUserPointer)© }
static CopyVarFunc getCopyFunc(void) { return (CopyVarFunc)© }
static void copy(T * dst,T * src) {
*dst = *src;
} // copy
};
--- End code ---
to:
--- Code: ---// === Class Type Helper class: returns a unique number for each class type ===
template<typename T>
struct ClassType {
static SQUserPointer type(void) __attribute__((noinline,noclone)) { return (SQUserPointer)© }
static CopyVarFunc getCopyFunc(void) __attribute__((noinline,noclone)) { return (CopyVarFunc)© }
static void copy(T * dst,T * src) __attribute__((noinline,noclone)) { *dst = *src; } // copy
};
--- End code ---
Without it e.g. wxString instance assignment made through script calls introduced outside scripted wizard cause
--- Code: ---INSTANCE type assignment mismatch
--- End code ---
error in running script for release version "-O2" compiled where the compiler optimized out mentioned methods from SDK DLL
The e.g. wxString must be referred then with
--- Code: ---extern template struct ClassType<wxString>;
--- End code ---
in code (plugin) introducing new script features to prevent error mentioned above.
oBFusCATed:
Please provide a patch in a proper form: http://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_to_BerliOS_%28Patch_Tracker%29
Also it would be helpful if you provide the exact steps needed to reproduce the problem.
Navigation
[0] Message Index
Go to full version