diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2014-05-27 14:01:20 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2014-05-27 14:01:20 -0400 |
commit | b70fa29511471e8a85f9b8c3e8947dbb3c21dedb (patch) | |
tree | 9d2e066dc2ad11d918ca12a1e073c163d4d4d79d /libdimension/dimension | |
parent | df33e223baa85b600863fc1b38850a5c37680632 (diff) | |
download | dimension-b70fa29511471e8a85f9b8c3e8947dbb3c21dedb.tar.xz |
pattern: Kill ->ptr field.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r-- | libdimension/dimension/pattern.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libdimension/dimension/pattern.h b/libdimension/dimension/pattern.h index c21ca8d..6e8c42f 100644 --- a/libdimension/dimension/pattern.h +++ b/libdimension/dimension/pattern.h @@ -1,5 +1,5 @@ /************************************************************************* - * Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> * + * Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> * * * * This file is part of The Dimension Library. * * * @@ -35,12 +35,16 @@ typedef struct dmnsn_pattern dmnsn_pattern; */ typedef double dmnsn_pattern_fn(const dmnsn_pattern *pattern, dmnsn_vector v); +/** + * Pattern destruction callback. + * @param[in,out] pattern The pattern to destroy. + */ +typedef void dmnsn_pattern_free_fn(dmnsn_pattern *pattern); + /** A pattern. */ struct dmnsn_pattern { dmnsn_pattern_fn *pattern_fn; /**< The pattern callback. */ - dmnsn_free_fn *free_fn; /**< The destructor callback. */ - - void *ptr; /**< Generic pointer. */ + dmnsn_pattern_free_fn *free_fn; /**< The destructor callback. */ DMNSN_REFCOUNT; /**< Reference count. */ }; @@ -52,6 +56,12 @@ struct dmnsn_pattern { dmnsn_pattern *dmnsn_new_pattern(void); /** + * Initialize a dmnsn_pattern field. + * @param[out] pattern The pattern to initialize. + */ +void dmnsn_init_pattern(dmnsn_pattern *pattern); + +/** * Delete a pattern. * @param[in,out] pattern The pattern to destroy. */ |