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
|
- compiler: gcc
|
||||||
os: linux
|
os: linux
|
||||||
env: SWIGLANG=python SWIG_FEATURES=-O
|
env: SWIGLANG=python SWIG_FEATURES=-O
|
||||||
# Currently broken
|
|
||||||
- compiler: gcc
|
|
||||||
os: linux
|
|
||||||
env: SWIGLANG=scilab
|
|
||||||
before_install:
|
before_install:
|
||||||
- date -u
|
- date -u
|
||||||
- uname -a
|
- uname -a
|
||||||
|
|
|
||||||
|
|
@ -60,14 +60,7 @@ namespace swig
|
||||||
|
|
||||||
operator T () const
|
operator T () const
|
||||||
{
|
{
|
||||||
try
|
return traits_asval_sequenceitem<T>::asval(_seq, piSeqAddr, _index);
|
||||||
{
|
|
||||||
return traits_asval_sequenceitem<T>::asval(_seq, piSeqAddr, _index);
|
|
||||||
}
|
|
||||||
catch (std::exception& e)
|
|
||||||
{
|
|
||||||
SWIG_exception(SWIG_RuntimeError, e.what());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SciSequence_Ref& operator=(const T& v)
|
SciSequence_Ref& operator=(const T& v)
|
||||||
|
|
@ -391,14 +384,19 @@ namespace swig {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return true;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
{
|
{
|
||||||
SWIG_exception(SWIG_RuntimeError, e.what());
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
||||||
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return SWIG_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -438,6 +436,7 @@ namespace swig {
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
{
|
{
|
||||||
SWIG_exception(SWIG_RuntimeError, e.what());
|
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;
|
void *pvTypeinfo = NULL;
|
||||||
|
|
||||||
sciErr = getListItemNumber(pvApiCtx, piAddrVar, &iItemCount);
|
sciErr = getListItemNumber(pvApiCtx, piAddrVar, &iItemCount);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return 0;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
if (iItemCount < 3) {
|
if (iItemCount < 3) {
|
||||||
return 0;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
sciErr = getPointerInList(pvApiCtx, piAddrVar, 2, &pvTypeinfo);
|
sciErr = getPointerInList(pvApiCtx, piAddrVar, 2, &pvTypeinfo);
|
||||||
if (sciErr.iErr) {
|
if (sciErr.iErr) {
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return 0;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (descriptor) {
|
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);
|
return (cast != NULL);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return SWIG_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return (iType == sci_pointer);
|
||||||
}
|
}
|
||||||
else return (iType == sci_pointer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGINTERN int
|
SWIGINTERN int
|
||||||
|
|
|
||||||
|
|
@ -47,21 +47,21 @@ namespace swig {
|
||||||
// Error returned for sequence containers of default item type
|
// Error returned for sequence containers of default item type
|
||||||
template <typename T> struct traits_as_sequence {
|
template <typename T> struct traits_as_sequence {
|
||||||
static int check(SwigSciObject obj) {
|
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) {
|
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) {
|
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 {
|
template <typename T> struct traits_from_sequence {
|
||||||
static int create(int size, void **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) {
|
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
|
// Error returned for sequence containers of default item type
|
||||||
template <typename T> struct traits_asval_sequenceitem {
|
template <typename T> struct traits_asval_sequenceitem {
|
||||||
static T asval(SwigSciObject obj, void *pSequence, int iItemIndex) {
|
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 {
|
template <typename T> struct traits_from_sequenceitem {
|
||||||
static int from(void *pSequence, int iItemIndex, T itemValue) {
|
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