From f209d5a409aa7e1c205622cf6eb5dd306995c407 Mon Sep 17 00:00:00 2001 From: Vincent Couvert Date: Thu, 24 Mar 2011 09:57:21 +0000 Subject: [PATCH] Implement SWIG_From_long git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@12554 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/scilab/sciprimtypes.swg | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Lib/scilab/sciprimtypes.swg b/Lib/scilab/sciprimtypes.swg index 8fdab0a96..b2cc25992 100644 --- a/Lib/scilab/sciprimtypes.swg +++ b/Lib/scilab/sciprimtypes.swg @@ -133,10 +133,15 @@ SWIGINTERN int SWIG_AsVal_dec(long)(int iPos, long* val) } %fragment(SWIG_From_frag(long),"header") { - SWIGINTERNINLINE int SWIG_From_dec(long) (long value) +SWIGINTERNINLINE int SWIG_From_dec(long) (long value) +{ + double dblValue = (double) value; + if (createScalarDouble(pvApiCtx, Rhs + 1, dblValue) == 0) { - return 0; + return SWIG_OK; } + return SWIG_ERROR; +} } /*%fragment(SWIG_AsPtr_frag(std::string),"header") {