[D] Use __cdecl instead of __stdcall on Windows as well to avoid special casing.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12303 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cd492d8300
commit
e362f85431
2 changed files with 9 additions and 9 deletions
|
|
@ -23,7 +23,7 @@ typedef enum {
|
||||||
SWIG_DNoSuchElementException,
|
SWIG_DNoSuchElementException,
|
||||||
} SWIG_DExceptionCodes;
|
} SWIG_DExceptionCodes;
|
||||||
|
|
||||||
typedef void (SWIGSTDCALL* SWIG_DExceptionCallback_t)(const char *);
|
typedef void (* SWIG_DExceptionCallback_t)(const char *);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
SWIG_DExceptionCodes code;
|
SWIG_DExceptionCodes code;
|
||||||
|
|
@ -49,7 +49,7 @@ static void SWIGUNUSED SWIG_DSetPendingException(SWIG_DExceptionCodes code, cons
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
#endif
|
||||||
SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionCallbacks_$module(
|
SWIGEXPORT void SWIGRegisterExceptionCallbacks_$module(
|
||||||
SWIG_DExceptionCallback_t exceptionCallback,
|
SWIG_DExceptionCallback_t exceptionCallback,
|
||||||
SWIG_DExceptionCallback_t illegalArgumentCallback,
|
SWIG_DExceptionCallback_t illegalArgumentCallback,
|
||||||
SWIG_DExceptionCallback_t illegalElementCallback,
|
SWIG_DExceptionCallback_t illegalElementCallback,
|
||||||
|
|
@ -253,13 +253,13 @@ alias void function(const char* message) SwigExceptionCallback;
|
||||||
#if !defined(SWIG_D_NO_STRING_HELPER)
|
#if !defined(SWIG_D_NO_STRING_HELPER)
|
||||||
%insert(runtime) %{
|
%insert(runtime) %{
|
||||||
// Callback for returning strings to D without leaking memory.
|
// Callback for returning strings to D without leaking memory.
|
||||||
typedef char * (SWIGSTDCALL* SWIG_DStringHelperCallback)(const char *);
|
typedef char * (* SWIG_DStringHelperCallback)(const char *);
|
||||||
static SWIG_DStringHelperCallback SWIG_d_string_callback = NULL;
|
static SWIG_DStringHelperCallback SWIG_d_string_callback = NULL;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
#endif
|
||||||
SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_$module(SWIG_DStringHelperCallback callback) {
|
SWIGEXPORT void SWIGRegisterStringCallback_$module(SWIG_DStringHelperCallback callback) {
|
||||||
SWIG_d_string_callback = callback;
|
SWIG_d_string_callback = callback;
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -1480,7 +1480,7 @@ public:
|
||||||
if (!is_void_return)
|
if (!is_void_return)
|
||||||
Wrapper_add_localv(f, "jresult", c_return_type, "jresult", NIL);
|
Wrapper_add_localv(f, "jresult", c_return_type, "jresult", NIL);
|
||||||
|
|
||||||
Printv(f->def, " SWIGEXPORT ", c_return_type, " SWIGSTDCALL ", wname, "(", NIL);
|
Printv(f->def, " SWIGEXPORT ", c_return_type, " ", wname, "(", NIL);
|
||||||
|
|
||||||
// Emit all of the local variables for holding arguments.
|
// Emit all of the local variables for holding arguments.
|
||||||
emit_parameter_variables(l, f);
|
emit_parameter_variables(l, f);
|
||||||
|
|
@ -2308,7 +2308,7 @@ public:
|
||||||
// Write the global callback function pointer on the C code.
|
// Write the global callback function pointer on the C code.
|
||||||
String *methid = Getattr(udata, "class_methodidx");
|
String *methid = Getattr(udata, "class_methodidx");
|
||||||
|
|
||||||
Printf(director_callback_typedefs, " typedef %s (SWIGSTDCALL* SWIG_Callback%s_t)", c_ret_type, methid);
|
Printf(director_callback_typedefs, " typedef %s (* SWIG_Callback%s_t)", c_ret_type, methid);
|
||||||
Printf(director_callback_typedefs, "(void *dobj%s);\n", callback_typedef_parms);
|
Printf(director_callback_typedefs, "(void *dobj%s);\n", callback_typedef_parms);
|
||||||
Printf(director_callback_pointers, " SWIG_Callback%s_t swig_callback_%s;\n", methid, overloaded_name);
|
Printf(director_callback_pointers, " SWIG_Callback%s_t swig_callback_%s;\n", methid, overloaded_name);
|
||||||
|
|
||||||
|
|
@ -3287,7 +3287,7 @@ private:
|
||||||
String *smartnamestr = SwigType_namestr(smart);
|
String *smartnamestr = SwigType_namestr(smart);
|
||||||
String *bsmartnamestr = SwigType_namestr(bsmart);
|
String *bsmartnamestr = SwigType_namestr(bsmart);
|
||||||
Printv(upcasts_code,
|
Printv(upcasts_code,
|
||||||
"SWIGEXPORT ", bsmartnamestr, " * SWIGSTDCALL ", upcast_wrapper_name,
|
"SWIGEXPORT ", bsmartnamestr, " * ", upcast_wrapper_name,
|
||||||
"(", smartnamestr, " *objectRef) {\n",
|
"(", smartnamestr, " *objectRef) {\n",
|
||||||
" return objectRef ? new ", bsmartnamestr, "(*objectRef) : 0;\n"
|
" return objectRef ? new ", bsmartnamestr, "(*objectRef) : 0;\n"
|
||||||
"}\n",
|
"}\n",
|
||||||
|
|
@ -3302,7 +3302,7 @@ private:
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Printv(upcasts_code,
|
Printv(upcasts_code,
|
||||||
"SWIGEXPORT ", c_base_name, " * SWIGSTDCALL ", upcast_wrapper_name,
|
"SWIGEXPORT ", c_base_name, " * ", upcast_wrapper_name,
|
||||||
"(", c_base_name, " *objectRef) {\n",
|
"(", c_base_name, " *objectRef) {\n",
|
||||||
" return (", c_base_name, " *)objectRef;\n"
|
" return (", c_base_name, " *)objectRef;\n"
|
||||||
"}\n",
|
"}\n",
|
||||||
|
|
@ -3480,7 +3480,7 @@ private:
|
||||||
Printf(wrap_dmodule_code, "extern(C) void function(void* cObject, void* dObject");
|
Printf(wrap_dmodule_code, "extern(C) void function(void* cObject, void* dObject");
|
||||||
|
|
||||||
code_wrap = NewWrapper();
|
code_wrap = NewWrapper();
|
||||||
Printf(code_wrap->def, "SWIGEXPORT void SWIGSTDCALL D_%s(void *objarg, void *dobj", connect_name);
|
Printf(code_wrap->def, "SWIGEXPORT void D_%s(void *objarg, void *dobj", connect_name);
|
||||||
|
|
||||||
Printf(code_wrap->code, " %s *obj = (%s *)objarg;\n", norm_name, norm_name);
|
Printf(code_wrap->code, " %s *obj = (%s *)objarg;\n", norm_name, norm_name);
|
||||||
Printf(code_wrap->code, " SwigDirector_%s *director = dynamic_cast<SwigDirector_%s *>(obj);\n", sym_name, sym_name);
|
Printf(code_wrap->code, " SwigDirector_%s *director = dynamic_cast<SwigDirector_%s *>(obj);\n", sym_name, sym_name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue