Feature #2067
closedbase.h and http_req.h type names
Description
There seem to be several variable names in these files that share their names with some of their instances. Is there any chance we can append _t to specify types?
- type http_req -> type http_req_t
- type request -> type request_t
- type response -> type response_t
- type physical -> type physical_t
- type stat_cache -> type stat_cache_t
This doesn't effect the C world, but its a little annoying if your trying to compile C++ code against these headers.
Files
Updated by jborgohain almost 15 years ago
- File Issue2067Trunk.diff Issue2067Trunk.diff added
- Target version set to 1.5.0
- % Done changed from 0 to 100
Here is a patch that includes the changes requested in this issue. This patch is for the trunk (1.5.0).
Updated by stbuehler almost 15 years ago
- % Done changed from 100 to 0
- Missing in 1.5.x set to No
*_t is reserved for the implementation.
Updated by jborgohain almost 15 years ago
Should I change it from "*_t" to something like "*_type"? Or how should this be tackled?
Updated by Olaf-van-der-Spek almost 15 years ago
stbuehler wrote:
*_t is reserved for the implementation.
What do you mean?
Updated by icy almost 15 years ago
_t is reserved for POSIX implementations. http://www.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
Many people ignore it and it would probably not be enforceable but well...
Updated by jborgohain almost 15 years ago
- File issue2067Trunk.dff issue2067Trunk.dff added
Resubmitting patch with new changes. Replaced suffix _t with _type.
Updated by Olaf-van-der-Spek almost 15 years ago
icy wrote:
_t is reserved for POSIX implementations. http://www.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
That doesn't sound right, although it's indeed what that doc says.
Many people ignore it and it would probably not be enforceable but well...
I think you should ignore it too.
Updated by jborgohain almost 15 years ago
Olaf-van-der-Spek wrote:
I think you should ignore it too.
Well, I have submitted two patches, one puts "_t" and the new one puts "_type". I can't commit, so... :)
Updated by stbuehler almost 15 years ago
- We will obviously not change the type names in 1.4.x (stable version, ...)
- As we are working on a new version (2.0), i don't want to put too much effort in 1.5. This means that i don't want to get more differences between 1.4 and 1.5, so that at least some patches are easy to port between them.
So i don't think this patch will go upstream. But i think the type/member names in 2.0 will be ok for c++ (and we prefixed all names, so hopefully no namespace conflicts with stupid lua libraries...).
Updated by gstrauss 9 months ago
- Related to Feature #1944: Bindings for C++ modules added
Also available in: Atom