[Asterisk-code-review] vector: Additional enhancements and fixes (asterisk[13])

Matt Jordan asteriskteam at digium.com
Wed May 6 10:51:51 CDT 2015


Matt Jordan has posted comments on this change.

Change subject: vector:  Additional enhancements and fixes
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/374/1/include/asterisk/vector.h
File include/asterisk/vector.h:

Line 134: 	ast_free((vec)->elems);			\
        : 	(vec)->elems = NULL;			\
        : 	(vec)->max = 0;				\
        : 	(vec)->current = 0;			\
Shouldn't this just invoke AST_VECTOR_FREE, then call ast_free?


Line 530:  * AST_VECTOR(, char *) vector_1;
        :  * AST_VECTOR(, char *) *vector_2;
        :  *
        :  * vector_2 = AST_VECTOR_CALLBACK_MULTIPLE(&vector_1, callback);
        :  *
        :  * Either of the following will work because you're using the type of the first
        :  * to declare the second:
        :  *
        :  * AST_VECTOR(mytype, char *) vector_1;
        :  * struct mytype *vector_2 = NULL;
        :  *
        :  * vector_2 = AST_VECTOR_CALLBACK_MULTIPLE(&vector_1, callback);
        :  *
        :  * AST_VECTOR(, char *) vector_1;
        :  * typeof(vector_1) *vector_2 = NULL;
        :  *
        :  * vector_2 = AST_VECTOR_CALLBACK_MULTIPLE(&vector_1, callback);
I'd surround the examples with some \code \endcode tags


-- 
To view, visit https://gerrit.asterisk.org/374
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I05e5e47fd02f61964be13b7e8942bab5d61b29cc
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list