Summary:ASTERISK-03105: [PATCH] list macros don't need "type" specified
Reporter:Kevin P. Fleming (kpfleming)Labels:
Date Opened:2004-12-27 15:03:01.000-0600Date Closed:2011-06-07 14:10:04
Versions:Frequency of
Environment:Attachments:( 0) list_use_typeof_rev2.diff.txt
Description:Through use of the compiler's typeof() macro, the list macros don't need to have the entry type specified, they can learn it for themselves at compile time.


Disclaimer is on file.
Comments:By: Kevin P. Fleming (kpfleming) 2004-12-27 15:03:35.000-0600

Doh... forgot to mention, patch is relative to bug 3140.

By: Mark Spencer (markster) 2005-01-01 15:19:32.000-0600

merged iN CVS, but don't you think that ASTOBJ makes this stuff rather obsolete?

By: Kevin P. Fleming (kpfleming) 2005-01-01 15:49:25.000-0600

(reopening to respond, for posterity)

Yes, ASTOBJ does make the list macros obsolete to some degree.

However, 99% of Asterisk is still using them, and I don't see the channel list being converted over any time soon unless we are being very brave :-)

In addition, there will always be a use for non-reference-counted lists; the situation that brought these patches about was dealing with the channel variable lists, which are not shared among multiple users. Adding reference counts and locks to struct ast_var_t would be extreme overkill, in my opinion, so they will continue to use the standard linked lists for the foreseeable future (unless I'm mistaken).

By: Kevin P. Fleming (kpfleming) 2005-01-01 15:49:53.000-0600

(only reopened to respond to Mark's question)

By: Digium Subversion (svnbot) 2008-01-15 15:19:19.000-0600

Repository: asterisk
Revision: 4629

U   trunk/apps/app_sql_postgres.c
U   trunk/channel.c
U   trunk/include/asterisk/linkedlists.h
U   trunk/pbx/pbx_dundi.c
U   trunk/pbx/pbx_loopback.c
U   trunk/pbx.c

r4629 | markster | 2008-01-15 15:19:18 -0600 (Tue, 15 Jan 2008) | 2 lines

List improvements from kpfleming (bugs ASTERISK-3105,ASTERISK-3081)