From d3b3df037197d46b608eb38a5dbd6f1d2761ec36 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 5 May 2018 14:27:54 +0200 Subject: IDProp API: add native C repr function Was using Python which wasn't very efficient (even for logging). --- source/blender/blenkernel/BKE_idprop.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/BKE_idprop.h') diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index 48a5db93504..8a2cdd7b37c 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -145,8 +145,13 @@ void IDP_RelinkProperty(struct IDProperty *prop); # define IDP_Id(prop) ((ID *) (prop)->data.pointer) #endif -/* for printout/logging only */ -char *IDP_reprN(const struct IDProperty *prop); +/* Format IDProperty as strings */ +char *IDP_reprN( + const struct IDProperty *prop, uint *r_len); +void IDP_repr_fn( + const IDProperty *prop, + void (*str_append_fn)(void *user_data, const char *str, uint str_len), + void *user_data); void IDP_print(const struct IDProperty *prop); #endif /* __BKE_IDPROP_H__ */ -- cgit v1.2.3