diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-02 22:25:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-02 22:25:48 +0000 |
commit | 69c3a52cfa679175da8f06bdcb8e2e4195465e44 (patch) | |
tree | 73109126cfcf1a807c5dc1e778f40b955fc959c5 /src/include/gnunet_peer_lib.h | |
parent | c42deb089faffd654e27bf661ce85d5c1bb38b7a (diff) | |
download | gnunet-69c3a52cfa679175da8f06bdcb8e2e4195465e44.tar.gz gnunet-69c3a52cfa679175da8f06bdcb8e2e4195465e44.zip |
avoid passing both PeerIdentity and Address (which contains PeerIdentity) if address is always present as then this is redundant
Diffstat (limited to 'src/include/gnunet_peer_lib.h')
-rw-r--r-- | src/include/gnunet_peer_lib.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/include/gnunet_peer_lib.h b/src/include/gnunet_peer_lib.h index fbe13e2cf..30347a8ff 100644 --- a/src/include/gnunet_peer_lib.h +++ b/src/include/gnunet_peer_lib.h | |||
@@ -38,11 +38,10 @@ extern "C" | |||
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * A GNUNET_PEER_Id is simply a shorter | 41 | * A GNUNET_PEER_Id is simply a shorter version of a "struct |
42 | * version of a "struct GNUNET_PeerIdentifier" | 42 | * GNUNET_PeerIdentifier" that can be used inside of a GNUnet peer to |
43 | * that can be used inside of a GNUnet peer | 43 | * save memory when the same identifier needs to be used over and over |
44 | * to save memory when the same identifier | 44 | * again. |
45 | * needs to be used over and over again. | ||
46 | */ | 45 | */ |
47 | typedef unsigned int GNUNET_PEER_Id; | 46 | typedef unsigned int GNUNET_PEER_Id; |
48 | 47 | ||
@@ -82,10 +81,11 @@ GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta); | |||
82 | * Decrement multiple RCs of peer identities by one. | 81 | * Decrement multiple RCs of peer identities by one. |
83 | * | 82 | * |
84 | * @param ids array of PIDs to decrement the RCs of | 83 | * @param ids array of PIDs to decrement the RCs of |
85 | * @param count size of the ids array | 84 | * @param count size of the @a ids array |
86 | */ | 85 | */ |
87 | void | 86 | void |
88 | GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count); | 87 | GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, |
88 | unsigned int count); | ||
89 | 89 | ||
90 | 90 | ||
91 | /** | 91 | /** |
@@ -95,14 +95,15 @@ GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count); | |||
95 | * @param pid where to write the normal peer identity | 95 | * @param pid where to write the normal peer identity |
96 | */ | 96 | */ |
97 | void | 97 | void |
98 | GNUNET_PEER_resolve (GNUNET_PEER_Id id, struct GNUNET_PeerIdentity *pid); | 98 | GNUNET_PEER_resolve (GNUNET_PEER_Id id, |
99 | struct GNUNET_PeerIdentity *pid); | ||
99 | 100 | ||
100 | 101 | ||
101 | /** | 102 | /** |
102 | * Convert an interned PID to a normal peer identity. | 103 | * Convert an interned PID to a normal peer identity. |
103 | * | 104 | * |
104 | * @param id interned PID to convert | 105 | * @param id interned PID to convert |
105 | * @return pointer to peer identity, valid as long 'id' is valid | 106 | * @return pointer to peer identity, valid as long @a id is valid |
106 | */ | 107 | */ |
107 | const struct GNUNET_PeerIdentity * | 108 | const struct GNUNET_PeerIdentity * |
108 | GNUNET_PEER_resolve2 (GNUNET_PEER_Id id); | 109 | GNUNET_PEER_resolve2 (GNUNET_PEER_Id id); |