aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/crystal.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-01-19 12:59:47 +0100
committerThomas White <taw@physics.org>2024-02-06 16:59:34 +0100
commitfd363c300c1767681ac6b03f05132d9e6d8a6884 (patch)
treebe6ce156bd9ca66a0682393675dd77c1a2ac18c3 /libcrystfel/src/crystal.c
parenta40db3a0a67914934f214d5ea9473ad3465235b5 (diff)
Fix incorrect uses of cell_free
This also gets rid of crystal_copy_deep. From now on, all crystal_copy calls also copy the UnitCell.
Diffstat (limited to 'libcrystfel/src/crystal.c')
-rw-r--r--libcrystfel/src/crystal.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/libcrystfel/src/crystal.c b/libcrystfel/src/crystal.c
index a21283f9..f0022fcc 100644
--- a/libcrystfel/src/crystal.c
+++ b/libcrystfel/src/crystal.c
@@ -91,38 +91,14 @@ Crystal *crystal_new()
/**
* \param cryst: A \ref Crystal to copy.
*
- * Creates a new \ref Crystal which is a copy of \p cryst. The copy is a "shallow
- * copy", which means that copies are NOT made of the data structures which
- * \p cryst contains references to, for example its \ref RefList.
- *
- * \returns A (shallow) copy of \p cryst, or NULL on failure.
- *
- */
-Crystal *crystal_copy(const Crystal *cryst)
-{
- Crystal *c;
-
- c = crystal_new();
- if ( c == NULL ) return NULL;
-
- memcpy(c, cryst, sizeof(Crystal));
- if ( c->notes != NULL ) c->notes = cfstrdup(c->notes);
-
- return c;
-}
-
-
-/**
- * \param cryst: A \ref Crystal to copy.
- *
* Creates a new \ref Crystal which is a copy of \p cryst. The copy is a "deep
* copy", which means that copies ARE made of the data structures which
- * \p cryst contains references to, for example its \ref RefList.
+ * \p cryst contains references to, for example its \ref UnitCell.
*
* \returns A (deep) copy of \p cryst, or NULL on failure.
*
*/
-Crystal *crystal_copy_deep(const Crystal *cryst)
+Crystal *crystal_copy(const Crystal *cryst)
{
Crystal *c;