merge from trunk
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11360 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
commit
84aecae48a
44 changed files with 366 additions and 188 deletions
|
|
@ -19,7 +19,7 @@
|
|||
%include <chicken/chickenkw.swg>
|
||||
%include <csharp/csharpkw.swg>
|
||||
%include <java/javakw.swg>
|
||||
%include <php/php.swg>
|
||||
%include <php/phpkw.swg>
|
||||
%include <pike/pikekw.swg>
|
||||
%include <python/pythonkw.swg>
|
||||
%include <ocaml/ocamlkw.swg>
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
if (PyDict_Check(obj)) {
|
||||
SwigVar_PyObject items = PyObject_CallMethod(obj,(char *)"items",NULL);
|
||||
%#if PY_VERSION_HEX >= 0x03000000
|
||||
/* In Python 3.x the ".items()" method return a dict_items object */
|
||||
items = PySequence_Fast(items, ".items() havn't returned a sequence!");
|
||||
/* In Python 3.x the ".items()" method returns a dict_items object */
|
||||
items = PySequence_Fast(items, ".items() didn't return a sequence!");
|
||||
%#endif
|
||||
res = traits_asptr_stdseq<std::map<K,T>, std::pair<K, T> >::asptr(items, val);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,12 @@
|
|||
#ifdef bind
|
||||
# undef bind
|
||||
#endif
|
||||
#ifdef close
|
||||
# undef close
|
||||
#endif
|
||||
#ifdef connect
|
||||
# undef connect
|
||||
#endif
|
||||
|
||||
|
||||
/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ SWIG_AsVal_dec(unsigned long long)(VALUE obj, unsigned long long *val)
|
|||
}
|
||||
|
||||
%fragment(SWIG_AsVal_frag(double),"header",fragment="SWIG_ruby_failed") {
|
||||
%ruby_aux_method(double, NUM2DBL, (type == T_FLOAT ? NUM2DBL(obj) : (type == T_FIXNUM ? (double) FIX2INT(obj) : rb_big2dbl(obj))))
|
||||
%ruby_aux_method(double, NUM2DBL, NUM2DBL(obj))
|
||||
|
||||
SWIGINTERN int
|
||||
SWIG_AsVal_dec(double)(VALUE obj, double *val)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *);
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Compatibility version for TCL stubs */
|
||||
#ifndef SWIG_TCL_STUBS_VERSION
|
||||
#define SWIG_TCL_STUBS_VERSION "8.1"
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
%init %{
|
||||
|
|
@ -74,10 +79,18 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
|
|||
int i;
|
||||
if (interp == 0) return TCL_ERROR;
|
||||
#ifdef USE_TCL_STUBS
|
||||
if (Tcl_InitStubs(interp, (char*)"8.1", 0) == NULL) {
|
||||
/* (char*) cast is required to avoid compiler warning/error for Tcl < 8.4. */
|
||||
if (Tcl_InitStubs(interp, (char*)SWIG_TCL_STUBS_VERSION, 0) == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_TK_STUBS
|
||||
/* (char*) cast is required to avoid compiler warning/error. */
|
||||
if (Tk_InitStubs(interp, (char*)SWIG_TCL_STUBS_VERSION, 0) == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
Tcl_PkgProvide(interp, (char*)SWIG_name, (char*)SWIG_version);
|
||||
|
||||
#ifdef SWIG_namespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue