[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/kjs
From: Harri Porten <porten () kde ! org>
Date: 2007-04-03 20:50:12
Message-ID: 1175633412.834347.14942.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 650102 by porten:
applying Maksim's patch for https://bugs.kde.org/142647
M +1 -1 regexp.cpp
M +13 -0 regexp_object.cpp
M +1 -0 regexp_object.h
--- branches/KDE/3.5/kdelibs/kjs/regexp.cpp #650101:650102
@@ -184,7 +184,7 @@
#ifndef NDEBUG
char errorMessage[80];
regerror(errorCode, &preg, errorMessage, sizeof errorMessage);
- fprintf(stderr, "KJS: regcomp failed with '%s'", errorMessage);
+ fprintf(stderr, "KJS: regcomp failed with '%s'\n", errorMessage);
#endif
valid = false;
}
--- branches/KDE/3.5/kdelibs/kjs/regexp_object.cpp #650101:650102
@@ -268,6 +268,19 @@
return InternalFunctionImp::get(exec, p);
}
+bool RegExpObjectImp::hasProperty(ExecState *exec, const Identifier &p) const
+{
+ UString s = p.ustring();
+ if (s[0] == '$' && lastOvector) {
+ bool ok;
+ (void)s.substr(1).toULong(&ok);
+ if (ok)
+ return true;
+ }
+
+ return InternalFunctionImp::hasProperty(exec, p);
+}
+
bool RegExpObjectImp::implementsConstruct() const
{
return true;
--- branches/KDE/3.5/kdelibs/kjs/regexp_object.h #650101:650102
@@ -75,6 +75,7 @@
virtual Value call(ExecState *exec, Object &thisObj, const List &args);
Value get(ExecState *exec, const Identifier &p) const;
+ bool hasProperty(ExecState *exec, const Identifier &propertyName) const;
int ** registerRegexp( const RegExp* re, const UString& s );
void setSubPatterns(int num) { lastNrSubPatterns = num; }
Object arrayOfMatches(ExecState *exec, const UString &result) const;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic