This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author benrg
Recipients benrg, rumpelsepp
Date 2022-02-25.07:14:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645773276.29.0.449132290476.issue46848@roundup.psfhosted.org>
In-reply-to
Content
memmem isn't a standard C function, and some libraries don't have it, notably Microsoft's.

newlib's memmem seems to be the same as glibc's, but is under a BSD 3-clause license instead of LGPL. An older version of newlib's memmem (prior to 2019-01-01) has the license "Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved", and is still highly optimized and much better than a naive implementation.

Of course, bundling it would no longer be quite so "free".

Old newlib memmem: https://sourceware.org/git/?p=newlib-cygwin.git;a=blob_plain;f=newlib/libc/string/memmem.c;h=25704e467decff5971b34f4189ddfff04ac5fa8e

New newlib memmem: https://sourceware.org/git/?p=newlib-cygwin.git;a=blob_plain;f=newlib/libc/string/memmem.c

Helper file for both: https://sourceware.org/git/?p=newlib-cygwin.git;a=blob_plain;f=newlib/libc/string/str-two-way.h
History
Date User Action Args
2022-02-25 07:14:36benrgsetrecipients: + benrg, rumpelsepp
2022-02-25 07:14:36benrgsetmessageid: <1645773276.29.0.449132290476.issue46848@roundup.psfhosted.org>
2022-02-25 07:14:36benrglinkissue46848 messages
2022-02-25 07:14:36benrgcreate