c9s / r3

libr3 is a high-performance path dispatching library. It compiles your route paths into a prefix tree (trie). By using the constructed prefix trie in the start-up time, you may dispatch your routes with efficiency
http://c9s.github.com/r3/bench.html
MIT License
814 stars 83 forks source link

API stability #66

Open czchen opened 10 years ago

czchen commented 10 years ago

When preparing 1.3.3 for debian, I found that two APIs r3_route_create and r3_tree_insert_pathl are removed. Also, several APIs like zcalloc, zfree are exported in 1.3.1. Since library API change requires transitions, is there any plan to provide stable API and hide private functions from exporting in next version?

c9s commented 10 years ago

I just checked and found route * r3_route_create(const char * path) is still there. ^^

c9s commented 10 years ago

r3_tree_insert_pathl is now a macro, which calls r3_tree_insert_pathl_ex to insert path.

c9s commented 10 years ago

is there any plan to provide stable API and hide private functions from exporting in next version?

yes, but I think it's something we will do 3+ month later. :-)

zmalloc related functions were moved into 3rdparty directory, I think we can remove the exported symbol.

czchen commented 10 years ago

Sorry, the term API is misunderstood. I actual want to say is ABI (application binary interface). Since r3_route_create is macro, it is not part of ABI.

For ABI, you can use prefix like r3 and use -export-symbols-regex to limit the exported symbols so that it won't cause any symbol collision.

c9s commented 10 years ago

Got it. is it also a policy of the debian package system?

czchen commented 10 years ago

API name suggestion is not related to debian. The purpose of API name with prefix r3 is to let developer use different libraries without worrying about API name collision.

c9s commented 8 years ago

Hi @czchen,

I think I would plan/refactor the stable API in version 2.0 (including hide the zfree ... functions)

czchen commented 8 years ago

Hi @c9s,

No problem. Just don't forget to bump so version so that it is more easily to do the incompatibility upgrade.