X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/ed35b2d30b2d7f336d94bbab59f114a21064ad58..fe555c380f0388cf711e219f84dd8b49fefb2cbb:/Internal.hpp diff --git a/Internal.hpp b/Internal.hpp index 7e6b1fd..e6f2d45 100644 --- a/Internal.hpp +++ b/Internal.hpp @@ -53,35 +53,6 @@ struct CYRoot : } }; -template -struct CYPrivateOld : - Base_ -{ - static JSClassRef Class_; - - template - _finline static JSClassRef GetClass(Args_ &&... args) { - return Class_; - } - - template - static JSObjectRef Make(JSContextRef context, Args_ &&... args) { - Internal_ *internal(new Internal_(cy::Forward(args)...)); - JSObjectRef object(JSObjectMake(context, Internal_::GetClass(cy::Forward(args)...), internal)); - if (JSValueRef prototype = internal->GetPrototype(context)) - CYSetPrototype(context, object, prototype); - return object; - } - - static Internal_ *Get(JSContextRef context, JSObjectRef object) { - _assert(JSValueIsObjectOfClass(context, object, Class_)); - return static_cast(JSObjectGetPrivate(object)); - } -}; - -template -JSClassRef CYPrivateOld::Class_; - template struct CYPrivate { static JSClassRef Class_;