Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHal Daume III <me@hal3.name>2013-01-14 20:44:55 +0400
committerHal Daume III <me@hal3.name>2013-01-14 20:44:55 +0400
commite2d88c905946196a930d388b6c5c1898f08ec41d (patch)
treed342c6c157aab8f056085647fbc0b37e3138c946 /vowpalwabbit/parse_primitives.h
parentadf48a7f8006726fe63d5251669ba309598b687b (diff)
fixed deep copy of label bug
Diffstat (limited to 'vowpalwabbit/parse_primitives.h')
-rw-r--r--vowpalwabbit/parse_primitives.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/vowpalwabbit/parse_primitives.h b/vowpalwabbit/parse_primitives.h
index d9a99652..57a6cebf 100644
--- a/vowpalwabbit/parse_primitives.h
+++ b/vowpalwabbit/parse_primitives.h
@@ -51,6 +51,7 @@ struct label_parser {
void (*delete_label)(void*);
float (*get_weight)(void*);
float (*get_initial)(void*);
+ void (*copy_label)(void*&,void*); // copy_label(dst,src) performs a DEEP copy of src into dst (dst is allocated correctly). if this function is NULL, then we assume that a memcpy of size label_size is sufficient, so you need only specify this function if your label constains, for instance, pointers (otherwise you'll get double-free errors)
size_t label_size;
};