I just tested this with django without the workaround and it works.
If this is committed, then the patch for django can be removed.

Was that the only spot in mxDateTime that was using the bm_free method?

Thanks,
Ryan

On Mon, May 25, 2009 at 7:23 PM, Federico G. Schwindt <[email protected]> wrote:
> On Mon, May 25, 2009 at 12:30:36PM -0400, Ian Darwin wrote:
>> Ryan Boggs wrote:
>>> Sorry, I don't mean to spam.
>>>
>>> I've updated the tar ball to list me as the maintainer (with Darrin's 
>>> approval).
>>>
>>> I also updated the MESSAGE file with the correct path to the online
>>> documentation and a message indicating changes between versions 0.96
>>> and 1.0 with a link to help with migration.
>>>
>>>
>> Thanks, I'll get this in shortly.
>
>  Instead of the presented workaround, please try with the diff below.o
>  This should fix the crash in python when TextSearch is used.
>
>  f.-
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/py-mxDateTime/Makefile,v
> retrieving revision 1.22
> diff -u -p -r1.22 Makefile
> --- Makefile    6 Apr 2009 18:21:26 -0000       1.22
> +++ Makefile    26 May 2009 02:11:09 -0000
> @@ -6,7 +6,7 @@ COMMENT=        Date and Time types for Python
>
>  VERSION=       3.1.2
>  DISTNAME=      egenix-mx-base-${VERSION}
> -PKGNAME=       py-mxDateTime-${VERSION}
> +PKGNAME=       py-mxDateTime-${VERSION}p0
>  CATEGORIES=    devel
>
>  MASTER_SITES=  http://www.lemburg.com/files/python/
> Index: patches/patch-mx_TextTools_mxTextTools_mxTextTools_c
> ===================================================================
> RCS file: patches/patch-mx_TextTools_mxTextTools_mxTextTools_c
> diff -N patches/patch-mx_TextTools_mxTextTools_mxTextTools_c
> --- /dev/null   1 Jan 1970 00:00:00 -0000
> +++ patches/patch-mx_TextTools_mxTextTools_mxTextTools_c        26 May 2009 
> 02:11:09 -0000
> @@ -0,0 +1,12 @@
> +$OpenBSD$
> +--- mx/TextTools/mxTextTools/mxTextTools.c.orig        Tue May 26 03:07:23 
> 2009
> ++++ mx/TextTools/mxTextTools/mxTextTools.c     Tue May 26 03:07:34 2009
> +@@ -269,7 +269,7 @@ void mxTextSearch_Free(mxTextSearchObject *so)
> +       switch  (so->algorithm) {
> +
> +       case MXTEXTSEARCH_BOYERMOORE:
> +-          bm_free(so->data);
> ++          mxbm_free(so->data);
> +           break;
> +
> + #ifdef MXFASTSEARCH
> Index: patches/patch-mx_TextTools_mxTextTools_mxbmse_c
> ===================================================================
> RCS file: patches/patch-mx_TextTools_mxTextTools_mxbmse_c
> diff -N patches/patch-mx_TextTools_mxTextTools_mxbmse_c
> --- /dev/null   1 Jan 1970 00:00:00 -0000
> +++ patches/patch-mx_TextTools_mxTextTools_mxbmse_c     26 May 2009 02:11:09 
> -0000
> @@ -0,0 +1,12 @@
> +$OpenBSD$
> +--- mx/TextTools/mxTextTools/mxbmse.c.orig     Tue May 26 03:06:54 2009
> ++++ mx/TextTools/mxTextTools/mxbmse.c  Tue May 26 03:06:56 2009
> +@@ -68,7 +68,7 @@ mxbmse_data *bm_init(char *match,
> +     return c;
> + }
> +
> +-void bm_free(mxbmse_data *c)
> ++void mxbm_free(mxbmse_data *c)
> + {
> +     if (c)
> +       free(c);
> Index: patches/patch-mx_TextTools_mxTextTools_mxbmse_h
> ===================================================================
> RCS file: patches/patch-mx_TextTools_mxTextTools_mxbmse_h
> diff -N patches/patch-mx_TextTools_mxTextTools_mxbmse_h
> --- /dev/null   1 Jan 1970 00:00:00 -0000
> +++ patches/patch-mx_TextTools_mxTextTools_mxbmse_h     26 May 2009 02:11:09 
> -0000
> @@ -0,0 +1,12 @@
> +$OpenBSD$
> +--- mx/TextTools/mxTextTools/mxbmse.h.orig     Tue May 26 03:07:05 2009
> ++++ mx/TextTools/mxTextTools/mxbmse.h  Tue May 26 03:07:09 2009
> +@@ -52,7 +52,7 @@ typedef struct {
> +
> + extern mxbmse_data *bm_init(char *match,
> +                           BM_LENGTH_TYPE match_len);
> +-extern void bm_free(mxbmse_data *c);
> ++extern void mxbm_free(mxbmse_data *c);
> + extern BM_INDEX_TYPE bm_search(mxbmse_data *c,
> +                              char *text,
> +                              BM_INDEX_TYPE start,
>

Reply via email to