Skip to content

Commit

Permalink
refactor(core): Deprecate _deleteMembers in favor of _clear
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Oct 18, 2020
1 parent c203430 commit ce890e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/nodeset_compiler/backend_open62541_typedefinitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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))
Expand Down

0 comments on commit ce890e9

Please sign in to comment.