Procházet zdrojové kódy

harmonize use of const pointers

Julius Pfrommer před 10 roky
rodič
revize
b0a7459e75
2 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 1 1
      src/ua_namespace.c
  2. 2 2
      src/ua_namespace.h

+ 1 - 1
src/ua_namespace.c

@@ -416,7 +416,7 @@ UA_Int32 Namespace_contains(const Namespace * ns, const UA_NodeId * nodeid) {
 	return find_entry(ns, nodeid, &entry);
 	return find_entry(ns, nodeid, &entry);
 }
 }
 
 
-UA_Int32 Namespace_get(Namespace const *ns, const UA_NodeId * nodeid, UA_Node const **result,
+UA_Int32 Namespace_get(Namespace const *ns, const UA_NodeId * nodeid, const UA_Node **result,
 					   Namespace_Entry_Lock ** lock) {
 					   Namespace_Entry_Lock ** lock) {
 	Namespace_Entry *entry;
 	Namespace_Entry *entry;
 	if(find_entry(ns, nodeid, &entry) != UA_SUCCESS)
 	if(find_entry(ns, nodeid, &entry) != UA_SUCCESS)

+ 2 - 2
src/ua_namespace.h

@@ -61,11 +61,11 @@ UA_Int32 Namespace_contains(const Namespace * ns, const UA_NodeId * nodeid);
 /** @brief Retrieve a node (read-only) from the namespace. Nodes are identified
 /** @brief Retrieve a node (read-only) from the namespace. Nodes are identified
 	by their NodeId. After the Node is no longer used, the lock needs to be
 	by their NodeId. After the Node is no longer used, the lock needs to be
 	released. */
 	released. */
-UA_Int32 Namespace_get(Namespace const *ns, const UA_NodeId * nodeid, UA_Node const **result,
+UA_Int32 Namespace_get(const Namespace *ns, const UA_NodeId * nodeid, const UA_Node **result,
 					   Namespace_Entry_Lock ** lock);
 					   Namespace_Entry_Lock ** lock);
 
 
 /** @brief A function that can be evaluated on all entries in a namespace via Namespace_iterate */
 /** @brief A function that can be evaluated on all entries in a namespace via Namespace_iterate */
-typedef void (*Namespace_nodeVisitor) (UA_Node const *node);
+typedef void (*Namespace_nodeVisitor) (const UA_Node *node);
 
 
 /** @brief Iterate over all nodes in a namespace */
 /** @brief Iterate over all nodes in a namespace */
 UA_Int32 Namespace_iterate(const Namespace * ns, Namespace_nodeVisitor visitor);
 UA_Int32 Namespace_iterate(const Namespace * ns, Namespace_nodeVisitor visitor);