Merge branch 'smarchetto-master' (Scilab test-suite fixes)
* smarchetto-master: Scilab Travis testing working again scilab: fix warnings scilab: fix compilation error (no return in SWIG_CheckPtr())
This commit is contained in:
commit
d05160afd2
4 changed files with 27 additions and 28 deletions
|
|
@ -161,10 +161,6 @@ matrix:
|
|||
- compiler: gcc
|
||||
os: linux
|
||||
env: SWIGLANG=python SWIG_FEATURES=-O
|
||||
# Currently broken
|
||||
- compiler: gcc
|
||||
os: linux
|
||||
env: SWIGLANG=scilab
|
||||
before_install:
|
||||
- date -u
|
||||
- uname -a
|
||||
|
|
|
|||
|
|
@ -60,14 +60,7 @@ namespace swig
|
|||
|
||||
operator T () const
|
||||
{
|
||||
try
|
||||
{
|
||||
return traits_asval_sequenceitem<T>::asval(_seq, piSeqAddr, _index);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
SWIG_exception(SWIG_RuntimeError, e.what());
|
||||
}
|
||||
return traits_asval_sequenceitem<T>::asval(_seq, piSeqAddr, _index);
|
||||
}
|
||||
|
||||
SciSequence_Ref& operator=(const T& v)
|
||||
|
|
@ -391,14 +384,19 @@ namespace swig {
|
|||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
SWIG_exception(SWIG_RuntimeError, e.what());
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -438,6 +436,7 @@ namespace swig {
|
|||
catch (std::exception& e)
|
||||
{
|
||||
SWIG_exception(SWIG_RuntimeError, e.what());
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -125,27 +125,31 @@ SwigScilabCheckPtr(void *pvApiCtx, int iVar, swig_type_info *descriptor, char *f
|
|||
void *pvTypeinfo = NULL;
|
||||
|
||||
sciErr = getListItemNumber(pvApiCtx, piAddrVar, &iItemCount);
|
||||
if (sciErr.iErr)
|
||||
{
|
||||
if (sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return 0;
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
if (iItemCount < 3) {
|
||||
return 0;
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
sciErr = getPointerInList(pvApiCtx, piAddrVar, 2, &pvTypeinfo);
|
||||
if (sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return 0;
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
if (descriptor) {
|
||||
swig_cast_info *cast = SWIG_TypeCheck(SWIG_TypeName((swig_type_info *)pvTypeinfo), descriptor);
|
||||
swig_cast_info *cast = SWIG_TypeCheck(SWIG_TypeName((swig_type_info*)pvTypeinfo), descriptor);
|
||||
return (cast != NULL);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return (iType == sci_pointer);
|
||||
}
|
||||
else return (iType == sci_pointer);
|
||||
}
|
||||
|
||||
SWIGINTERN int
|
||||
|
|
|
|||
|
|
@ -47,21 +47,21 @@ namespace swig {
|
|||
// Error returned for sequence containers of default item type
|
||||
template <typename T> struct traits_as_sequence {
|
||||
static int check(SwigSciObject obj) {
|
||||
SWIG_Error(SWIG_TypeError, type_name<T>());
|
||||
throw std::invalid_argument("The container data type is not supported.");
|
||||
}
|
||||
static int get(SwigSciObject obj, void **sequence) {
|
||||
SWIG_Error(SWIG_TypeError, type_name<T>());
|
||||
throw std::invalid_argument("The container data type is not supported.");
|
||||
}
|
||||
static int size(SwigSciObject obj, int *size) {
|
||||
SWIG_Error(SWIG_TypeError, type_name<T>());
|
||||
throw std::invalid_argument("The container data type is not supported.");
|
||||
}
|
||||
};
|
||||
template <typename T> struct traits_from_sequence {
|
||||
static int create(int size, void **sequence) {
|
||||
SWIG_Error(SWIG_TypeError, type_name<T>());
|
||||
throw std::invalid_argument("The container data type is not supported.");
|
||||
}
|
||||
static SwigSciObject set(int size, void *sequence) {
|
||||
SWIG_Error(SWIG_TypeError, type_name<T>());
|
||||
throw std::invalid_argument("The container data type is not supported.");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -136,12 +136,12 @@ namespace swig {
|
|||
// Error returned for sequence containers of default item type
|
||||
template <typename T> struct traits_asval_sequenceitem {
|
||||
static T asval(SwigSciObject obj, void *pSequence, int iItemIndex) {
|
||||
SWIG_Error(SWIG_TypeError, type_name<T>());
|
||||
throw std::invalid_argument("The container data type is not supported.");
|
||||
}
|
||||
};
|
||||
template <typename T> struct traits_from_sequenceitem {
|
||||
static int from(void *pSequence, int iItemIndex, T itemValue) {
|
||||
SWIG_Error(SWIG_TypeError, type_name<T>());
|
||||
throw std::invalid_argument("The container data type is not supported.");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue