]> git.saurik.com Git - cycript.git/commitdiff
Move a line of code so that it matches other cases.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 15 Sep 2012 06:15:26 +0000 (23:15 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 15 Sep 2012 06:15:26 +0000 (23:15 -0700)
Execute.cpp

index 4f7358a68dd85ec077e7515b07ed2d192f57e326..53dda402e1cf75da8f7b699621ae58ac8185977d 100644 (file)
@@ -1076,10 +1076,10 @@ static JSValueRef Type_getProperty(JSContextRef context, JSObjectRef object, JSS
 } CYCatch }
 
 static JSValueRef Type_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) { CYTry {
 } CYCatch }
 
 static JSValueRef Type_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) { CYTry {
-    Type_privateData *internal(reinterpret_cast<Type_privateData *>(JSObjectGetPrivate(object)));
-
     if (count != 1)
         throw CYJSError(context, "incorrect number of arguments to type cast function");
     if (count != 1)
         throw CYJSError(context, "incorrect number of arguments to type cast function");
+    Type_privateData *internal(reinterpret_cast<Type_privateData *>(JSObjectGetPrivate(object)));
+
     sig::Type *type(internal->type_);
     ffi_type *ffi(internal->GetFFI());
     // XXX: alignment?
     sig::Type *type(internal->type_);
     ffi_type *ffi(internal->GetFFI());
     // XXX: alignment?