From ce890e9d332450ba303eb6f59e623d8050ec2991 Mon Sep 17 00:00:00 2001 From: Julius Pfrommer Date: Sat, 17 Oct 2020 22:45:18 +0200 Subject: [PATCH] refactor(core): Deprecate _deleteMembers in favor of _clear --- tools/nodeset_compiler/backend_open62541_typedefinitions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/nodeset_compiler/backend_open62541_typedefinitions.py b/tools/nodeset_compiler/backend_open62541_typedefinitions.py index d30e3c35cc3..6c09b3b3b23 100644 --- a/tools/nodeset_compiler/backend_open62541_typedefinitions.py +++ b/tools/nodeset_compiler/backend_open62541_typedefinitions.py @@ -205,7 +205,7 @@ def print_functions(self, datatype): if datatype.pointerfree == "true": funcs += "static UA_INLINE UA_StatusCode\nUA_%s_copy(const UA_%s *src, UA_%s *dst) {\n *dst = *src;\n return UA_STATUSCODE_GOOD;\n}\n\n" % ( idName, idName, idName) - funcs += "static UA_INLINE void\nUA_%s_deleteMembers(UA_%s *p) {\n memset(p, 0, sizeof(UA_%s));\n}\n\n" % ( + funcs += "UA_DEPRECATED static UA_INLINE void\nUA_%s_deleteMembers(UA_%s *p) {\n memset(p, 0, sizeof(UA_%s));\n}\n\n" % ( idName, idName, idName) funcs += "static UA_INLINE void\nUA_%s_clear(UA_%s *p) {\n memset(p, 0, sizeof(UA_%s));\n}\n\n" % ( idName, idName, idName) @@ -217,7 +217,7 @@ def print_functions(self, datatype): funcs += "static UA_INLINE UA_StatusCode\nUA_%s_copy(const UA_%s *src, UA_%s *dst) {\n return UA_copy(src, dst, %s);\n}\n\n" % ( idName, idName, idName, self.print_datatype_ptr(datatype)) - funcs += "static UA_INLINE void\nUA_%s_deleteMembers(UA_%s *p) {\n UA_clear(p, %s);\n}\n\n" % ( + funcs += "UA_DEPRECATED static UA_INLINE void\nUA_%s_deleteMembers(UA_%s *p) {\n UA_clear(p, %s);\n}\n\n" % ( idName, idName, self.print_datatype_ptr(datatype)) funcs += "static UA_INLINE void\nUA_%s_clear(UA_%s *p) {\n UA_clear(p, %s);\n}\n\n" % ( idName, idName, self.print_datatype_ptr(datatype))