[asterisk-dev] API changes 1.4.0 -> 1.6.0, review requested on specific files

Jeff Peeler jpeeler at digium.com
Tue Apr 29 15:54:38 CDT 2008


I've been working on a document that outlines all the public API changes
for 1.6.0. The goal is to provide a list of functions whose prototype
has changed (and why it changed), functions that have been removed
(along with its replacement if it exists), any structure members that
have been removed, or any other changes that need to be known to
properly update the code for use with 1.6.0. The hope is that this
document will assist in migrating code from 1.4. So far an intelligent
comparison has been made between all the header files between the two
releases. There are four files in particular that have changed
dramatically and I need feedback on. Those files are:

./include/asterisk/stringfields.h - Listed below are several removed
defines that need either replacements listed or need verification they
are no longer required.

-#define ast_string_field_count(x)
-#define ast_string_field_index(x, field)
-#define ast_string_field_index_free(x, index)
-#define ast_string_field_free(x, field)
-#define ast_string_field_free_pools(x)
-#define ast_string_field_free_all(x)

./include/asterisk/threadstorage.h - Need to figure out where all the
string handling defines/functions have gone.
./include/asterisk/aes.h - Lots of changes, not sure if the ability to
use keys larger than 128 bits has been removed.
./include/asterisk/lock.h - It appears that this file may have just been
reorganized, but would like verification.

Functions that only have changed by adding the const qualifier or
similar obvious changes have been listed but without explanation. Here
is a small sample of what the documentation currently looks like:

./channels/iax2-parser.h

-int outoforder;
+unsigned int outoforder:1;

-int sentyet;
+unsigned int sentyet:1;

-int transfer;
-int final;
-int direction;
+unsigned int transfer:1;
+unsigned int final:1;
+unsigned int direction:2;
+unsigned int cacheable:1;

/*! Amount of space _allocated_ for data */
-size_t mallocd_datalen;
+size_t afdatalen;

-struct iax_frame *iax_frame_new(int direction, int datalen);
+struct iax_frame *iax_frame_new(int direction, int datalen, unsigned
int cacheable);
/Reason: cacheable: the iax_frame if marked as cacheable will stay in
memory as long as low memory optimization has not been turned on.
/Old behavior: Pass in 0 for cacheable.

Any formatting is up for debate. It would be nice if one person claimed
a file and then emailed the changes. Once the changes have been merged
I'll post the whole document for review.

Jeff




More information about the asterisk-dev mailing list