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

Side by Side Diff: src/third_party/jscre/pcre_internal.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/third_party/jscre/pcre_exec.cpp ('k') | src/third_party/jscre/pcre_tables.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 JavaScriptCore's variant of the PCRE library. While this library 1 /* This is JavaScriptCore's variant of the PCRE library. While this library
2 started out as a copy of PCRE, many of the features of PCRE have been 2 started out as a copy of PCRE, many of the features of PCRE have been
3 removed. This library now supports only the regular expression features 3 removed. This library now supports only the regular expression features
4 required by the JavaScript language specification, and has only the functions 4 required by the JavaScript language specification, and has only the functions
5 needed by JavaScriptCore and the rest of WebKit. 5 needed by JavaScriptCore and the rest of WebKit.
6 6
7 Originally written by Philip Hazel 7 Originally written by Philip Hazel
8 Copyright (c) 1997-2006 University of Cambridge 8 Copyright (c) 1997-2006 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 inline, and there are *still* stupid compilers about that don't like indented 96 inline, and there are *still* stupid compilers about that don't like indented
97 pre-processor statements, or at least there were when I first wrote this. After 97 pre-processor statements, or at least there were when I first wrote this. After
98 all, it had only been about 10 years then... */ 98 all, it had only been about 10 years then... */
99 99
100 #ifdef DEBUG 100 #ifdef DEBUG
101 #define DPRINTF(p) printf p 101 #define DPRINTF(p) printf p
102 #else 102 #else
103 #define DPRINTF(p) /*nothing*/ 103 #define DPRINTF(p) /*nothing*/
104 #endif 104 #endif
105 105
106 namespace v8 { namespace jscre {
107
106 /* PCRE keeps offsets in its compiled code as 2-byte quantities (always stored 108 /* PCRE keeps offsets in its compiled code as 2-byte quantities (always stored
107 in big-endian order) by default. These are used, for example, to link from the 109 in big-endian order) by default. These are used, for example, to link from the
108 start of a subpattern to its alternatives and its end. The use of 2 bytes per 110 start of a subpattern to its alternatives and its end. The use of 2 bytes per
109 offset limits the size of the compiled regex to around 64K, which is big enough 111 offset limits the size of the compiled regex to around 64K, which is big enough
110 for almost everybody. However, I received a request for an even bigger limit. 112 for almost everybody. However, I received a request for an even bigger limit.
111 For this reason, and also to make the code easier to maintain, the storing and 113 For this reason, and also to make the code easier to maintain, the storing and
112 loading of offsets from the byte string is now handled by the functions that are 114 loading of offsets from the byte string is now handled by the functions that are
113 defined here. */ 115 defined here. */
114 116
115 /* PCRE uses some other 2-byte quantities that do not change when the size of 117 /* PCRE uses some other 2-byte quantities that do not change when the size of
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 while (*opcodePtr == OP_ALT); 411 while (*opcodePtr == OP_ALT);
410 } 412 }
411 413
412 /* Internal shared functions. These are functions that are used in more 414 /* Internal shared functions. These are functions that are used in more
413 that one of the source files. They have to have external linkage, but 415 that one of the source files. They have to have external linkage, but
414 but are not part of the public API and so not exported from the library. */ 416 but are not part of the public API and so not exported from the library. */
415 417
416 extern int kjs_pcre_ucp_othercase(unsigned); 418 extern int kjs_pcre_ucp_othercase(unsigned);
417 extern bool kjs_pcre_xclass(int, const unsigned char*); 419 extern bool kjs_pcre_xclass(int, const unsigned char*);
418 420
421 } } // namespace v8::jscre
419 #endif 422 #endif
420 423
421 #endif 424 #endif
422 425
423 /* End of pcre_internal.h */ 426 /* End of pcre_internal.h */
OLDNEW
« no previous file with comments | « src/third_party/jscre/pcre_exec.cpp ('k') | src/third_party/jscre/pcre_tables.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698