| 1 |
Description: The struct member 'delete' conflicts in C++ code |
| 2 |
Upstream patch |
| 3 |
Author: Dirk Eddelbuettel <[email protected]> |
| 4 |
Bug-Debian: https://bugs.debian.org/907119 |
| 5 |
Origin: upstream, http://git.savannah.gnu.org/cgit/gsl.git/commit/?id=d9a747a9d2819899e436bb546edd61bfcab0558e |
| 6 |
Bug-Debian: https://bugs.debian.org/912341 |
| 7 |
Last-Update: 2018-11-27 |
| 8 |
|
| 9 |
--- gsl-2.5+dfsg.orig/filter/rmedian.c |
| 10 |
+++ gsl-2.5+dfsg/filter/rmedian.c |
| 11 |
@@ -188,7 +188,7 @@ static int |
| 12 |
rmedian_delete(void * vstate) |
| 13 |
{ |
| 14 |
rmedian_state_t * state = (rmedian_state_t *) vstate; |
| 15 |
- return (state->minmax_acc->delete)(state->minmax_state); |
| 16 |
+ return (state->minmax_acc->delete_oldest)(state->minmax_state); |
| 17 |
} |
| 18 |
|
| 19 |
static int |
| 20 |
--- gsl-2.5+dfsg.orig/movstat/apply.c |
| 21 |
+++ gsl-2.5+dfsg/movstat/apply.c |
| 22 |
@@ -91,7 +91,7 @@ gsl_movstat_apply_accum(const gsl_movsta |
| 23 |
for (i = 0; i < H; ++i) |
| 24 |
(accum->insert)(x1, w->state); |
| 25 |
} |
| 26 |
- else if (accum->delete == NULL) /* FIXME XXX */ |
| 27 |
+ else if (accum->delete_oldest == NULL) /* FIXME XXX */ |
| 28 |
{ |
| 29 |
/* save last K - 1 samples of x for later (needed for in-place input/output) */ |
| 30 |
int idx1 = GSL_MAX(n - J - H, 0); |
| 31 |
@@ -125,7 +125,7 @@ gsl_movstat_apply_accum(const gsl_movsta |
| 32 |
int idx1 = GSL_MAX(n - J, 0); |
| 33 |
int idx2 = n - 1; |
| 34 |
|
| 35 |
- if (accum->delete == NULL) |
| 36 |
+ if (accum->delete_oldest == NULL) |
| 37 |
{ |
| 38 |
int wsize = n - GSL_MAX(n - J - H, 0); /* size of work array */ |
| 39 |
|
| 40 |
@@ -154,7 +154,7 @@ gsl_movstat_apply_accum(const gsl_movsta |
| 41 |
if (i - H > 0) |
| 42 |
{ |
| 43 |
/* delete oldest window sample as we move closer to edge */ |
| 44 |
- (accum->delete)(w->state); |
| 45 |
+ (accum->delete_oldest)(w->state); |
| 46 |
} |
| 47 |
|
| 48 |
/* yi = acc_get [ work(i:K-2) ] */ |
| 49 |
--- gsl-2.5+dfsg.orig/movstat/gsl_movstat.h |
| 50 |
+++ gsl-2.5+dfsg/movstat/gsl_movstat.h |
| 51 |
@@ -43,19 +43,19 @@ typedef enum |
| 52 |
} gsl_movstat_end_t; |
| 53 |
|
| 54 |
/* accumulator struct |
| 55 |
- * size - return number of bytes needed for accumulator with maximum of n elements |
| 56 |
- * init - initialize accumulator state |
| 57 |
- * insert - insert a single sample into accumulator; if there are already n |
| 58 |
- * samples in accumulator, oldest sample is overwritten |
| 59 |
- * delete - delete oldest sample from accumulator |
| 60 |
- * get - return accumulated value |
| 61 |
+ * size - return number of bytes needed for accumulator with maximum of n elements |
| 62 |
+ * init - initialize accumulator state |
| 63 |
+ * insert - insert a single sample into accumulator; if there are already n |
| 64 |
+ * samples in accumulator, oldest sample is overwritten |
| 65 |
+ * delete_oldest - delete oldest sample from accumulator |
| 66 |
+ * get - return accumulated value |
| 67 |
*/ |
| 68 |
typedef struct |
| 69 |
{ |
| 70 |
size_t (*size) (const size_t n); |
| 71 |
int (*init) (const size_t n, void * vstate); |
| 72 |
int (*insert) (const double x, void * vstate); |
| 73 |
- int (*delete) (void * vstate); |
| 74 |
+ int (*delete_oldest) (void * vstate); |
| 75 |
int (*get) (void * params, double * result, const void * vstate); |
| 76 |
} gsl_movstat_accum; |
| 77 |
|