diff --git a/src/RJSList.cpp b/src/RJSList.cpp index dfb35bb5..66978780 100644 --- a/src/RJSList.cpp +++ b/src/RJSList.cpp @@ -224,6 +224,6 @@ const JSStaticFunction RJSListFuncs[] = { }; JSClassRef RJSListClass() { - static JSClassRef s_listClass = RJSCreateWrapperClass("RealmList", ListGetProperty, ListSetProperty, RJSListFuncs, NULL, ListPropertyNames); + static JSClassRef s_listClass = RJSCreateWrapperClass("RealmList", ListGetProperty, ListSetProperty, RJSListFuncs, ListPropertyNames); return s_listClass; } diff --git a/src/RJSObject.mm b/src/RJSObject.mm index 1d088469..b56c2801 100644 --- a/src/RJSObject.mm +++ b/src/RJSObject.mm @@ -58,7 +58,7 @@ void ObjectPropertyNames(JSContextRef ctx, JSObjectRef object, JSPropertyNameAcc } JSClassRef RJSObjectClass() { - static JSClassRef s_objectClass = RJSCreateWrapperClass("RealmObject", ObjectGetProperty, ObjectSetProperty, NULL, NULL, ObjectPropertyNames); + static JSClassRef s_objectClass = RJSCreateWrapperClass("RealmObject", ObjectGetProperty, ObjectSetProperty, NULL, ObjectPropertyNames); return s_objectClass; } diff --git a/src/RJSResults.mm b/src/RJSResults.mm index 7cdad982..594d48de 100644 --- a/src/RJSResults.mm +++ b/src/RJSResults.mm @@ -124,6 +124,6 @@ JSClassRef RJSResultsClass() { {"sortByProperty", SortByProperty, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete}, {NULL, NULL}, }; - static JSClassRef s_objectClass = RJSCreateWrapperClass("Results", ResultsGetProperty, NULL, resultsFuncs, NULL, ResultsPropertyNames); + static JSClassRef s_objectClass = RJSCreateWrapperClass("Results", ResultsGetProperty, NULL, resultsFuncs, ResultsPropertyNames); return s_objectClass; } diff --git a/src/RJSUtil.hpp b/src/RJSUtil.hpp index b53f2034..0ff3beeb 100644 --- a/src/RJSUtil.hpp +++ b/src/RJSUtil.hpp @@ -43,10 +43,11 @@ inline T RJSGetInternal(JSObjectRef jsObject) { } template -JSClassRef RJSCreateWrapperClass(const char * name, JSObjectGetPropertyCallback getter = NULL, JSObjectSetPropertyCallback setter = NULL, const JSStaticFunction *funcs = NULL, JSObjectFinalizeCallback finalize = RJSFinalize, JSObjectGetPropertyNamesCallback propertyNames = NULL) { +JSClassRef RJSCreateWrapperClass(const char * name, JSObjectGetPropertyCallback getter = NULL, JSObjectSetPropertyCallback setter = NULL, const JSStaticFunction *funcs = NULL, + JSObjectGetPropertyNamesCallback propertyNames = NULL) { JSClassDefinition classDefinition = kJSClassDefinitionEmpty; classDefinition.className = name; - classDefinition.finalize = finalize; + classDefinition.finalize = RJSFinalize; classDefinition.getProperty = getter; classDefinition.setProperty = setter; classDefinition.staticFunctions = funcs;