# HG changeset patch # User michelemartone # Date 1365028032 0 # Node ID dc26083af003027c03e755c3b2527459587718c8 # Parent 47465dd0b44d31d8ce99f6e256bcf0e7dd8e3e5b correction to ugly identifiers overlap. diff -r 47465dd0b44d -r dc26083af003 main/sparsersb/src/sparsersb.cc --- a/main/sparsersb/src/sparsersb.cc Wed Apr 03 22:19:51 2013 +0000 +++ b/main/sparsersb/src/sparsersb.cc Wed Apr 03 22:27:12 2013 +0000 @@ -1722,6 +1722,9 @@ RSBOI_WARN(RSBOI_O_MISSIMPERRMSG); } + if(isr) + osmp=((octave_sparsersb_mtx*)(args(0).internal_rep())); + if(ic3 || ic0) #if RSBOI_WANT_DOUBLE_COMPLEX RSBOI_WARN(RSBOI_0_UNCFEMSG); @@ -1765,14 +1768,13 @@ rsb_err_t errval=RSB_ERR_NO_ERROR; const char *mis=args(2).string_value().c_str(); rsb_real_t miv=RSBOI_ZERO;/* FIXME: this is extreme danger! */ - const struct rsb_mtx_t*osmp=((octave_sparsersb_mtx*)(args(0).internal_rep()))->mtxAp; char ss[RSBOI_INFOBUF]; - if(!osmp)goto ret;/* FIXME: error handling missing here */ + if(!osmp || !osmp->mtxAp)goto ret;/* FIXME: error handling missing here */ if(strlen(mis)==0) { mis="RSB_MIF_MATRIX_INFO__TO__CHAR_P"; } - errval = rsb_mtx_get_info_str(osmp,mis,ss,RSBOI_INFOBUF); + errval = rsb_mtx_get_info_str(osmp->mtxAp,mis,ss,RSBOI_INFOBUF); if(!RSBOI_SOME_ERROR(errval)) { @@ -1805,10 +1807,8 @@ if (nargin == 2 && isr && args(1).is_string()) { char ss[RSBOI_INFOBUF]; - const struct rsb_mtx_t*osmp=NULL; - osmp=((octave_sparsersb_mtx*)(args(0).internal_rep()))->mtxAp; - if(!osmp)goto ret;/* FIXME: error handling missing here */ - rsb_mtx_get_info_str(osmp,"RSB_MIF_MATRIX_INFO__TO__CHAR_P",ss,RSBOI_INFOBUF); + if(!osmp || !osmp->mtxAp)goto ret;/* FIXME: error handling missing here */ + rsb_mtx_get_info_str(osmp->mtxAp,"RSB_MIF_MATRIX_INFO__TO__CHAR_P",ss,RSBOI_INFOBUF); /* FIXME: to add interpretation */ RSBOI_WARN(RSBOI_0_UNFFEMSG);/* FIXME: this is yet unfinished */ octave_stdout << "Matrix information (in the future, supplementary information may be returned, as more inquiry functionality will be implemented):\n" << ss << "\n"; @@ -2016,7 +2016,7 @@ RSBOI_DEBUG_NOTICE(RSBOI_0_FATALNBMSG); } #if RSBOI_WANT_HEAVY_DEBUG - if(!rsb_is_correctly_built_rcsr_matrix(osmp->mtxAp)) // non-declared function + if(!rsb_is_correctly_built_rcsr_matrix(osmp->mtxAp)) // function non in rsb.h's API { RSBOI_WARN(RSBOI_0_NEEDERR); RSBOI_DEBUG_NOTICE(RSBOI_0_UNCBERR);