diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-21 09:14:06 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-21 09:14:06 (GMT) |
commit | 8e3cca4a153a5178a77ae6956292606563f4b8fe (patch) | |
tree | 89537d5153690ee0d9a7b0038b1280f407f70dc3 /src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp | |
parent | 794575f01ce5a6bf7e377eb815f3def5aded74f5 (diff) | |
download | uscxml-8e3cca4a153a5178a77ae6956292606563f4b8fe.zip uscxml-8e3cca4a153a5178a77ae6956292606563f4b8fe.tar.gz uscxml-8e3cca4a153a5178a77ae6956292606563f4b8fe.tar.bz2 |
More work on JSC implementation for ecma datamodel
Diffstat (limited to 'src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp')
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp index 04bb8ec..ba6d506 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp @@ -16,23 +16,19 @@ JSStaticFunction JSCNotation::staticFunctions[] = { { 0, 0, 0 } }; -JSValueRef JSCNotation::publicIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - struct JSCNotationPrivate* privData = static_cast<JSCNotation::JSCNotationPrivate* >(JSObjectGetPrivate(thisObj)); - JSStringRef retString = JSStringCreateWithUTF8CString(privData->arabicaThis->getPublicId().c_str()); - JSValueRef retObj = JSValueMakeString(ctx, retString); - JSStringRelease(retString); - return retObj; - +JSValueRef JSCNotation::publicIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { + struct JSCNotationPrivate* privData = (struct JSCNotationPrivate*)JSObjectGetPrivate(object); + JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getPublicId().c_str()); + return JSValueMakeString(ctx, stringRef); } -JSValueRef JSCNotation::systemIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - struct JSCNotationPrivate* privData = static_cast<JSCNotation::JSCNotationPrivate* >(JSObjectGetPrivate(thisObj)); - JSStringRef retString = JSStringCreateWithUTF8CString(privData->arabicaThis->getSystemId().c_str()); - JSValueRef retObj = JSValueMakeString(ctx, retString); - JSStringRelease(retString); - return retObj; +JSValueRef JSCNotation::systemIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { + struct JSCNotationPrivate* privData = (struct JSCNotationPrivate*)JSObjectGetPrivate(object); + JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getSystemId().c_str()); + return JSValueMakeString(ctx, stringRef); } + } } |