[Asterisk-cvs] asterisk/doc CODING-GUIDELINES,1.15,1.16

kpfleming at lists.digium.com kpfleming at lists.digium.com
Sun Jul 10 19:49:46 CDT 2005


Update of /usr/cvsroot/asterisk/doc
In directory mongoose.digium.com:/tmp/cvs-serv4871/doc

Modified Files:
	CODING-GUIDELINES 
Log Message:
more thoughts


Index: CODING-GUIDELINES
===================================================================
RCS file: /usr/cvsroot/asterisk/doc/CODING-GUIDELINES,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- CODING-GUIDELINES	10 Jul 2005 23:51:10 -0000	1.15
+++ CODING-GUIDELINES	10 Jul 2005 23:58:07 -0000	1.16
@@ -218,6 +218,16 @@
 another static function, consider the value of creating a new API call 
 which can be shared.
 
+As a common example of this point, make an effort to use the lockable
+linked-list macros found in include/asterisk/linkedlists.h. They are
+efficient, easy to use and provide every operation that should be
+necessary for managing a singly-linked list (if something is missing,
+let us know!). Just because you see other open-coded list implementations
+in the source tree is no reason to continue making new copies of
+that code... There are also a number of common string manipulation
+and timeval manipulation functions in asterisk/strings.h and asterisk/time.h;
+use them when possible.
+
 When you achieve your desired functionalty, make another few refactor
 passes over the code to optimize it.
 




More information about the svn-commits mailing list