Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: src/third_party/jscre/pcre.h

Issue 12511: Added the v8::jscre namespace around the jscre functions to avoid link errors... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/jsregexp.cc ('k') | src/third_party/jscre/pcre_compile.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This is the public header file for JavaScriptCore's variant of the PCRE 1 /* This is the public header file for JavaScriptCore's variant of the PCRE
2 library. While this library started out as a copy of PCRE, many of the 2 library. While this library started out as a copy of PCRE, many of the
3 features of PCRE have been removed. This library now supports only the 3 features of PCRE have been removed. This library now supports only the
4 regular expression features required by the JavaScript language 4 regular expression features required by the JavaScript language
5 specification, and has only the functions needed by JavaScriptCore and the 5 specification, and has only the functions needed by JavaScriptCore and the
6 rest of WebKit. 6 rest of WebKit.
7 7
8 Copyright (c) 1997-2005 University of Cambridge 8 Copyright (c) 1997-2005 University of Cambridge
9 Copyright (C) 2002, 2004, 2006, 2007 Apple Inc. All rights reserved. 9 Copyright (C) 2002, 2004, 2006, 2007 Apple Inc. All rights reserved.
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #ifndef JSRegExp_h 42 #ifndef JSRegExp_h
43 #define JSRegExp_h 43 #define JSRegExp_h
44 44
45 #include "../../../include/v8.h" 45 #include "../../../include/v8.h"
46 46
47 // JSCRE is very chatty in debug mode, so in order to keep it slient 47 // JSCRE is very chatty in debug mode, so in order to keep it slient
48 // while still importing v8.h correctly (it contains #ifdef DEBUGs) 48 // while still importing v8.h correctly (it contains #ifdef DEBUGs)
49 // we allow DEBUG to be set and undef it manually. 49 // we allow DEBUG to be set and undef it manually.
50 #undef DEBUG 50 #undef DEBUG
51 51
52 namespace v8 { namespace jscre {
53
52 typedef uint16_t UChar; 54 typedef uint16_t UChar;
53 55
54 struct JSRegExp; 56 struct JSRegExp;
55 typedef struct JSRegExp JscreRegExp; 57 typedef struct JSRegExp JscreRegExp;
56 58
57 enum JSRegExpIgnoreCaseOption { JSRegExpDoNotIgnoreCase, JSRegExpIgnoreCase }; 59 enum JSRegExpIgnoreCaseOption { JSRegExpDoNotIgnoreCase, JSRegExpIgnoreCase };
58 enum JSRegExpMultilineOption { JSRegExpSingleLine, JSRegExpMultiline }; 60 enum JSRegExpMultilineOption { JSRegExpSingleLine, JSRegExpMultiline };
59 61
60 /* jsRegExpExecute error codes */ 62 /* jsRegExpExecute error codes */
61 const int JSRegExpErrorNoMatch = -1; 63 const int JSRegExpErrorNoMatch = -1;
62 const int JSRegExpErrorHitLimit = -2; 64 const int JSRegExpErrorHitLimit = -2;
63 const int JSRegExpErrorNoMemory = -3; 65 const int JSRegExpErrorNoMemory = -3;
64 const int JSRegExpErrorInternal = -4; 66 const int JSRegExpErrorInternal = -4;
65 67
66 typedef void* malloc_t(size_t size); 68 typedef void* malloc_t(size_t size);
67 typedef void free_t(void* address); 69 typedef void free_t(void* address);
68 70
69 JSRegExp* jsRegExpCompile(const UChar* pattern, int patternLength, 71 JSRegExp* jsRegExpCompile(const UChar* pattern, int patternLength,
70 JSRegExpIgnoreCaseOption, JSRegExpMultilineOption, 72 JSRegExpIgnoreCaseOption, JSRegExpMultilineOption,
71 unsigned* numSubpatterns, const char** errorMessage, 73 unsigned* numSubpatterns, const char** errorMessage,
72 malloc_t* allocate_function, free_t* free_function); 74 malloc_t* allocate_function, free_t* free_function);
73 75
74 int jsRegExpExecute(const JSRegExp*, 76 int jsRegExpExecute(const JSRegExp*,
75 const UChar* subject, int subjectLength, int startOffset, 77 const UChar* subject, int subjectLength, int startOffset,
76 int* offsetsVector, int offsetsVectorLength); 78 int* offsetsVector, int offsetsVectorLength);
77 79
78 void jsRegExpFree(JSRegExp*); 80 void jsRegExpFree(JSRegExp*);
79 81
82 } } // namespace v8::jscre
83
80 #endif 84 #endif
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | src/third_party/jscre/pcre_compile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698