Commit 557dea1c authored by Guido van Rossum's avatar Guido van Rossum

AMK's latest -- synchronized with PCRE 1.04.

parent 0148bbf9
......@@ -3,7 +3,7 @@
*************************************************/
#define PCRE_VERSION "1.02 12-Dec-1997"
#define PCRE_VERSION "1.04 22-Dec-1997"
/* This is a library of functions to support regular expressions whose syntax
......@@ -39,6 +39,7 @@ modules, but which are not relevant to the outside. */
define a macro for memmove() if USE_BCOPY is defined. */
#ifdef USE_BCOPY
#undef memmove /* some systems may have a macro */
#define memmove(a, b, c) bcopy(b, a, c)
#endif
......@@ -53,6 +54,13 @@ define a macro for memmove() if USE_BCOPY is defined. */
#include <string.h>
#include "pcre.h"
/* In case there is no definition of offsetof() provided - though any proper
Standard C system should have one. */
#ifndef offsetof
#define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field))
#endif
/* Private options flags start at the most significant end of the two bytes.
The public options defined in pcre.h start at the least significant end. Make
sure they don't overlap! */
......
......@@ -14,6 +14,7 @@
/* Have to include stdlib.h in order to ensure that size_t is defined;
it is needed here for malloc. */
#include <sys/types.h>
#include <stdlib.h>
/* Options */
......
......@@ -231,7 +231,7 @@ PyPcre_compile(self, args)
newpattern[j++]='\0';
newpattern[j++]='\0';
newpattern[j++]='\0';
newpattern[j]='\0';
newpattern[j]='\0';
rv->regex = pcre_compile((char*)newpattern, options,
&error, &erroroffset, dictionary);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment