# HG changeset patch # User John W. Eaton # Date 1285747282 14400 # Node ID 52609f73c7d9900c206b5066611e99ed8941a020 # Parent 14993c9e857e83b311814fd84b969446bff37606 __glpk__.cc: use octave_scalar_map instead of Octave_map diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2010-09-29 John W. Eaton + + * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Use octave_scalar_map + instead of Octave_map. + (OCTAVE_GLPK_GET_REAL_PARAM, OCTAVE_GLPK_GET_INT_PARAM): + Update for octave_scalar_map. + 2010-09-29 John W. Eaton * DLD-FUNCTIONS/amd.cc (Famd): Use octave_scalar_map instead of diff --git a/src/DLD-FUNCTIONS/__glpk__.cc b/src/DLD-FUNCTIONS/__glpk__.cc --- a/src/DLD-FUNCTIONS/__glpk__.cc +++ b/src/DLD-FUNCTIONS/__glpk__.cc @@ -418,13 +418,13 @@ #define OCTAVE_GLPK_GET_REAL_PARAM(NAME, IDX) \ do \ { \ - if (PARAM.contains (NAME)) \ + octave_value tmp = PARAM.contents (NAME); \ + \ + if (tmp.is_defined ()) \ { \ - Cell tmp = PARAM.contents (NAME); \ - \ if (! tmp.is_empty ()) \ { \ - lpxRealParam[IDX] = tmp(0).scalar_value (); \ + lpxRealParam[IDX] = tmp.scalar_value (); \ \ if (error_state) \ { \ @@ -444,13 +444,13 @@ #define OCTAVE_GLPK_GET_INT_PARAM(NAME, VAL) \ do \ { \ - if (PARAM.contains (NAME)) \ + octave_value tmp = PARAM.contents (NAME); \ + \ + if (tmp.is_defined ()) \ { \ - Cell tmp = PARAM.contents (NAME); \ - \ if (! tmp.is_empty ()) \ { \ - VAL = tmp(0).int_value (); \ + VAL = tmp.int_value (); \ \ if (error_state) \ { \ @@ -681,7 +681,7 @@ sense = -1; //-- 9th Input. A structure containing the control parameters. - Octave_map PARAM = args(8).map_value (); + octave_scalar_map PARAM = args(8).scalar_map_value (); if (error_state) {