Patch of http://sourceforge.net/p/swig/mailman/message/29816385
Fix shared data problem on MacOS 10.9 with xcode 5.1

Move to construct on first use idiom for singleton definition,
which prevents problems with singletons between ruby swig modules
in an environment with multiple modules on MacOS 10.9 with xcode 5.1.

Before this fix, data was being shared between modules which caused
a crash on shutdown of the ruby interpreter if more than one
module was loaded at a time.
Fixed JSClassRef declaration not using the static one

The class descriptor is not assigned to the static variable but to a local one, which makes the global variable unused.
Remove long line wrapping from Python parameter list generation code.

This doesn't play well with PEP8 checks which imposes very strict continuation
line indentation rules which need to be _visually_ aligned, i.e. the subsequent
lines must be indented by the position of the opening bracket in the function
declaration line, but the code generating the parameter lists doesn't have
this information and so it's impossible to do it while avoiding either E128 or
E123 ("continuation line {under,over}-indented for visual indent" respectively)
error from pep8.

Moreover, the wrapping code didn't work correctly anyhow as it only took into
account the length of the parameter list itself and not the total line length,
which should include the function name as well.

So just disable wrapping entirely, long lines shouldn't be a problem anyhow in
auto-generated code.
Tcl documentation correction

From Ben Golding on swig-devel list.
Update Php.html

Short summary of the fact that dl() function can no longer be used.
Merge pull request #204 from ibell/patch-1

Update Php.html
Fix incorrect examples of regex %rename
Improve PHP docs about extension= and dl()
_
Fix issue with relative import when using single header file import.
  -- The commit propagates the package option to the newly create
     module node so it is recognized by SWIG
  -- Added a relativeimport test for this combination
     (in lack of py3 I was not able to test it with py3 but it
      "should just work")
small suggestions for changes in std_ios.i

Hi

Would it be possible to add the following 2 typedefs to std_ios.i?

 typedef basic_ios<char> ios;
 typedef basic_ios<wchar_t> wios;

at present, it contains only

 %template(ios) basic_ios<char>;
 %template(wios) basic_ios<wchar_t>;

This means however that things like std::ios::openmode are currently not
recognised by SWIG. With the above typedefs, they are. Similar typedefs
should probably be added in std_iostream.i for ostream etc.

Also, while checking std_ios.i, it seems that the definition of basic_ios
has a copy-paste error in the private section (the constructor is still as
ios_base). To avoid confusion, I suggest to change that. Below is a diff
with the suggested changes.

Kris
Initialize C++ arrays created by array_functions' new_foo().

`array_functions(TYPE, NAME)' generates a `new_foo(size)' function that
allocates a new array of the given type.  When compiling in C, the array
is initialized with `calloc()', which shows that the intent was to have
the array be zero-initialized.  When in C++, however, the array was not
getting initialized, so it could contain random garbage after creation,
when the type was a POD type.

This change makes `new_foo(size)' create a value-initialized array when
in C++, as per the C++ standard's 5.3.4.15 that says that adding a pair
of parentheses at the end of a new-expression does that.
fixup! Patch of http://sourceforge.net/p/swig/mailman/message/29816385
C# exception %exception example fix

From Cindy Gan
[skip ci]
apply SF Patch #350 and add testcase
Refactor: move makeParameterName() to common Language base class.

This method was duplicated more or less identically for 4 languages and will
be needed for another one soon, so put it in the base class from which it can
be simply reused instead.

No changes in the program behaviour whatsoever.
No real changes, just make PYTHON::check_kwargs() const.

This will allow calling it from const methods too.
Don't always use "*args" for all Python wrapper functions.

Due to what seems like a bug introduced during Python 3 support merge, all the
generated Python functions used the general "*args" signature instead of using
the named parameters when possible.

This happened due to is_primitive_defaultargs() always returning false for the
functions without any default arguments as "value" passed to convertValue()
was NULL in this case and convertValue() always returns false for NULL.

Fix this by checking for value being non-NULL before calling convertValue().

Doing this exposed several problems with the handling of unnamed, duplicate
(happens for parameters called INOUT, for example) or clashing with keywords
parameter names, so the code dealing with them had to be fixed too. Basically
just use makeParameterName() consistently everywhere.
Allow using enum elements as default values for Python functions.

Enum values are just (integer) constants in Python and so can be used as the
function default values just as well as literal numbers, account for this when
checking whether function parameters can be represented in Python.

Also rename is_primitive_defaultargs() to is_representable_as_pyargs() to
describe better what this function does.