bugfix #1356577, changed double=>lua_number in a few places.

added the std::pair wrapping


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8672 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Mark Gossage 2006-02-02 01:41:06 +00:00
commit 8328eb6e34
6 changed files with 103 additions and 12 deletions

44
Lib/lua/std_pair.i Normal file
View file

@ -0,0 +1,44 @@
/***********************************************************************
* std_pair.i
*
* std::pair typemaps for LUA
*
* Author : Mark Gossage (mark@gossage.cjb.net)
************************************************************************/
%{
#include <utility>
%}
/*
A really cut down version of the pair class.
this is not useful on its owns is it needs a %template definition with it
eg.
namespace std {
%template(IntPair) pair<int, int>;
%template(make_IntPair) make_pair<int, int>;
}
*/
namespace std {
template <class T, class U > struct pair {
typedef T first_type;
typedef U second_type;
pair();
pair(T first, U second);
pair(const pair& p);
T first;
U second;
};
template <class T, class U >
pair<T,U> make_pair(const T&,const U&);
}