aboutsummaryrefslogtreecommitdiff
path: root/nerv/lib/matrix/generic/matrix.c
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2015-06-25 12:58:42 +0800
committerDeterminant <ted.sybil@gmail.com>2015-06-25 12:58:42 +0800
commit8b2aa75b9d7c0b4d4333e7847e3ad90c5fcf97fb (patch)
tree7a7ac0325bb15597fb473e7b3bcf1a54e4e5bd16 /nerv/lib/matrix/generic/matrix.c
parent5e407d74130accfbbf94d2cabcb03fc126a89410 (diff)
use the standard nerv error reporting in io lib
Diffstat (limited to 'nerv/lib/matrix/generic/matrix.c')
-rw-r--r--nerv/lib/matrix/generic/matrix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nerv/lib/matrix/generic/matrix.c b/nerv/lib/matrix/generic/matrix.c
index 91577e1..a64759e 100644
--- a/nerv/lib/matrix/generic/matrix.c
+++ b/nerv/lib/matrix/generic/matrix.c
@@ -1,5 +1,5 @@
#ifdef NERV_GENERIC_MATRIX
-#include "../../../common.h"
+#include "../../common.h"
#include "matrix.h"
/* FIXME: malloc failure detection */
@@ -12,7 +12,7 @@ static void nerv_matrix_(data_free)(Matrix *self, Status *status) {
free(self->data_ref);
free(self);
}
- else NERV_SET_STATUS(status, MAT_NORMAL, 0);
+ else NERV_SET_STATUS(status, NERV_NORMAL, 0);
}
static void nerv_matrix_(data_retain)(Matrix *self) {
@@ -27,7 +27,7 @@ Matrix *nerv_matrix_(create)(long nrow, long ncol, Status *status) {
MATRIX_DATA_ALLOC(&MATRIX_ELEM_PTR(self), &self->stride,
sizeof(MATRIX_ELEM) * self->ncol, self->nrow,
status);
- if (status->err_code != MAT_NORMAL)
+ if (status->err_code != NERV_NORMAL)
{
free(self);
return NULL;
@@ -35,7 +35,7 @@ Matrix *nerv_matrix_(create)(long nrow, long ncol, Status *status) {
self->data_ref = (long *)malloc(sizeof(long));
*self->data_ref = 0;
nerv_matrix_(data_retain)(self);
- NERV_SET_STATUS(status, MAT_NORMAL, 0);
+ NERV_SET_STATUS(status, NERV_NORMAL, 0);
return self;
}