|
Re: Minor libmemcache issue inside php extension: msg#00057web.cache.memcached
I worked on a php extension wrapper for libmemcache over the weekend and Persistent memcache objects make sense, but not requests or anything else like that. I wouldn't do callbacks for PHP unless someone requests it, but ... well, I don't hear many people screaming for a PHP SAX interface. I did run into one minor issue, it seems that the %hu and %zu format Grrr... This is where I start to hate gcc'isms and the lack of standards in the grey areas of what should be apart of a standard. size_t (ie: uint32_t or uint64_t) is universally standard, but size_t has variable widths depending on the architecture, yet there is no printf(3) format specifier that's universal when converting it to a string. On OS-X and FreeBSD from fprintf(3): Modifier d, i o, u, x, X n hh signed char unsigned char signed char * h short unsigned short short * l (ell) long unsigned long long * ll (ell ell) long long unsigned long long long long * j intmax_t uintmax_t intmax_t * t ptrdiff_t (see note) ptrdiff_t * z (see note) size_t (see note) q (deprecated) quad_t u_quad_t quad_t * There is no equiv fprintf(3) format string on many other OSes. Think it'd fly if I said the solution to this can be found here: http://www.FreeBSD.org/ ? Probably not, eh? Crap. Alright, I'll convert this to %u for now with the explicit understanding that you're going to take a cluebat to each and every broken distro out there and ask them to get their shit together. Thanks in advance. *grin* I can only assume php is overriding my systems %u had better work as a format specifier. As such I'm currently working with having patched the Ah, cool... arrived at the same solution. Maybe for portability it should just be changed to that? Yup, already done. I plan to clean up my php extension work and finish up the remaining It's been exciting to see your benchmarks. :) 1.2.1 is minutes away from seeing the light of day. -sc -- Sean Chittenden |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: memcache(3) 1.2.0 released...: 00057, Sean Chittenden |
|---|---|
| Next by Date: | Re: [announce] php: mcache extension 1.0: 00057, Sean Chittenden |
| Previous by Thread: | Re: Minor libmemcache issue inside php extensioni: 00057, John McCaskey |
| Next by Thread: | Memcached mlockall() fix: 00057, Kate Turner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |