# HG changeset patch # User John W. Eaton # Date 1216668209 14400 # Node ID ba2e00a216e8baadd7e26be233813c4034611b15 # Parent 0da8455b31c17295fd37701c0b30d8f273a5b0b3 Do not use "error" in octave_base_mutex class diff -r 0da8455b31c1 -r ba2e00a216e8 liboctave/ChangeLog --- a/liboctave/ChangeLog Mon Jul 21 15:19:32 2008 -0400 +++ b/liboctave/ChangeLog Mon Jul 21 15:23:29 2008 -0400 @@ -1,3 +1,11 @@ +2008-07-21 Michael Goffioul + + * oct-mutex.h (octave_base_mutex::octave_base_mutex): Initialize + count to 1, not -1. + + * oct-mutex.cc (octave_base_mutex::lock, octave_base_mutex::unlock): + Replace error calls with (*current_liboctave_error_handler). + 2008-07-21 John W. Eaton * regex-match.cc (regex_match::init): Initialize err to 0. diff -r 0da8455b31c1 -r ba2e00a216e8 liboctave/oct-mutex.cc --- a/liboctave/oct-mutex.cc Mon Jul 21 15:19:32 2008 -0400 +++ b/liboctave/oct-mutex.cc Mon Jul 21 15:23:29 2008 -0400 @@ -25,7 +25,7 @@ #endif #include "oct-mutex.h" -#include "error.h" +#include "lo-error.h" #if defined (HAVE_PTHREAD_H) #include @@ -38,13 +38,13 @@ void octave_base_mutex::lock (void) { - error ("mutex not supported on this platform"); + (*current_liboctave_error_handler) ("mutex not supported on this platform"); } void octave_base_mutex::unlock (void) { - error ("mutex not supported on this platform"); + (*current_liboctave_error_handler) ("mutex not supported on this platform"); } #if defined (__WIN32__) && ! defined (__CYGWIN__) diff -r 0da8455b31c1 -r ba2e00a216e8 liboctave/oct-mutex.h --- a/liboctave/oct-mutex.h Mon Jul 21 15:19:32 2008 -0400 +++ b/liboctave/oct-mutex.h Mon Jul 21 15:23:29 2008 -0400 @@ -31,7 +31,7 @@ public: friend class octave_mutex; - octave_base_mutex (void) : count (-1) { } + octave_base_mutex (void) : count (1) { } virtual ~octave_base_mutex (void) { }