Ensure that SWIG_VERSION is defined both at SWIG-time and in the generated C/C++ wrapper code (it was only defined in the wrapper for some target languages previously). SWIGGO and SWIGJAVASCRIPT are now defined in the generated wrappers to match behaviour for all other target languages. Stop defining SWIGVERSION in the wrapper. This only happened as a side-effect of how SWIG_VERSION was defined but was never documented and is redundant. The new testcase also checks that SWIG is defined at SWIG-time but not in the generated wrapper, and that exactly one of a list of target-language specific macros is defined. Fixes #1050
35 lines
1.1 KiB
OpenEdge ABL
35 lines
1.1 KiB
OpenEdge ABL
/* -----------------------------------------------------------------------------
|
|
* guile.i
|
|
*
|
|
* SWIG Configuration File for Guile.
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
%include <typemaps/swigversion.swg>
|
|
|
|
/* Macro for inserting Scheme code into the stub */
|
|
#define %scheme %insert("scheme")
|
|
#define %goops %insert("goops")
|
|
|
|
/* Return-styles */
|
|
%pragma(guile) return_nothing_doc = "Returns unspecified."
|
|
%pragma(guile) return_one_doc = "Returns $values."
|
|
|
|
%define %values_as_list
|
|
%pragma(guile) beforereturn = ""
|
|
%pragma(guile) return_multi_doc = "Returns a list of $num_values values: $values."
|
|
%enddef
|
|
%values_as_list /* the default style */
|
|
|
|
%define %values_as_vector
|
|
%pragma(guile) beforereturn = "GUILE_MAYBE_VECTOR"
|
|
%pragma(guile) return_multi_doc = "Returns a vector of $num_values values: $values."
|
|
%enddef
|
|
|
|
%define %multiple_values
|
|
%pragma(guile) beforereturn = "GUILE_MAYBE_VALUES"
|
|
%pragma(guile) return_multi_doc = "Returns $num_values values: $values."
|
|
%enddef
|
|
|
|
#define GUILE_APPEND_RESULT SWIG_APPEND_VALUE
|
|
|
|
%include <typemaps.i>
|