[Win32utils-devel] 1.9.x compatibility for win32-api

Luis Lavena luislavena at gmail.com
Wed Feb 18 11:55:26 EST 2009


On Wed, Feb 18, 2009 at 2:31 PM, Berger, Daniel <Daniel.Berger at qwest.com> wrote:
> Hi,
>
> Anyone have any ideas on how to make win32-api compatible with 1.9.x?
>
> It seems 1.9 doesn't allow stuff like RSTRING(ptr)->len; you must instead use wrapper macros like RSTRING_LEN(ptr). I'm not really sure why.
>
> Anyway, I've added a have_macro check to the extconf.rb file, so we detect if we're on 1.9.x via:
>
> #ifndef HAVE_RSTRING_LEN
> #define HAVE_RSTRING_LEN xxx <- What should go here?
> #endif
>

Why a macro check?

This is the average working solution to it:

http://github.com/fauna/mongrel/blob/HEAD/ext/http11/http11.c#L11-16


HTH,
-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry


More information about the win32utils-devel mailing list