Comments (4)
Ruby uses customized version of Onigmo. Currently, the customized version is stored in the branch tmp/ruby-2.0.x
.
(You can see the differences between the branches master
and tmp/ruby-2.0.x
here: master...tmp;ruby-2.0.x#files_bucket )
Warning functions are also customized for Ruby. Your patch is only needed for the branch tmp/ruby-2.0.x
.
onig_verb_warn
is still used in the master branch. So, it is not a good idea to remove onig_verb_warn
and related codes. Isn't it enough to change inside the function set_quantifier
?
from onigmo.
On your master branch, I only see the following uses:
$ git branch
* master
$ git grep -n -C 1 "onig_verb_warn"
regparse.c-90-#ifdef DEFAULT_VERB_WARN_FUNCTION
regparse.c:91:static OnigWarnFunc onig_verb_warn = (OnigWarnFunc )DEFAULT_VERB_WARN_FUNCTION;
regparse.c-92-#else
regparse.c:93:static OnigWarnFunc onig_verb_warn = onig_null_warn;
regparse.c-94-#endif
--
regparse.c-102-{
regparse.c:103: onig_verb_warn = f;
regparse.c-104-}
--
regparse.c-5217- case RQ_DEL:
regparse.c:5218: if (onig_verb_warn != onig_null_warn) {
regparse.c-5219- onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
--
regparse.c-5221- (UChar* )"redundant nested repeat operator");
regparse.c:5222: (*onig_verb_warn)((char* )buf);
regparse.c-5223- }
--
regparse.c-5227- default:
regparse.c:5228: if (onig_verb_warn != onig_null_warn) {
regparse.c-5229- onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
--
regparse.c-5233- ReduceQStr[ReduceTypeTable[targetq_num][nestq_num]]);
regparse.c:5234: (*onig_verb_warn)((char* )buf);
regparse.c-5235- }
So once onig_verb_warn
is no longer used in lines 5222 and 5234, it is no longer used anywhere.
from onigmo.
onig_verb_warn
is used for verbose warning function.
Removing them cause API incompatibility.
from onigmo.
Ah, I understand! Both onig_set_verb_warn_func
and onig_verb_warn
are part of the public API, so we should not delete them. Thanks for the analysis.
I just opened #32 that is a smaller fix, only changing those two references to instead use onig_syntax_warn
.
from onigmo.
Related Issues (20)
- invalid pattern compilation /(^*0m\d{2}\:\d{2}\:\d{2})/ HOT 1
- 'st_check_for_sizeof_st_index_t' declared as array with a negative size HOT 15
- Python packaging
- Memory corruption in onig_error_code_to_str() HOT 1
- Out-of-bounds read in parse_char_class() HOT 1
- ſ(U+017F) and K(U+212A) should not be case-insensitive equivalent to S and K HOT 5
- error: Linking globals named 'regerror' with Emscripten
- Memory leaks reported by Scan Coverity
- Stack-buffer-overflow in renumber_by_map in regcomp.c HOT 1
- Name2CType data wrong for many Indic scripts? HOT 2
- `[\p{Emoji}]` also matches numerical characters HOT 1
- Absence operator is broken HOT 2
- Add API to mitigate exponential backtracking (ReDoS) HOT 3
- Use of \K when the string to match after \K can be empty
- Support Unicode script extensions
- Captured strings of (.)(\g<1>) are same HOT 4
- An error occurred while using case-insensitive option (?i) . HOT 5
- A deficient regex pattern causes app to freeze .
- Separating or excluding the regcomp/regexec/regerror functions from the library.
- Windows | fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onigmo.