if (JSValueIsObjectOfClass(context, value, Selector_)) {
Selector_privateData *internal(reinterpret_cast<Selector_privateData *>(JSObjectGetPrivate((JSObjectRef) value)));
return reinterpret_cast<SEL>(internal->value_);
- } else
- return CYCastPointer<SEL>(context, value);
+ } else {
+ CYPool pool;
+ return sel_registerName(CYPoolCString(pool, context, value));
+ }
}
void *CYObjectiveC_ExecuteStart(JSContextRef context) { CYSadTry {
argument = &(*argument)->next_;
}
- return $C2($V("objc_msgSend"), self_, ($ CYSelector(selector))->Replace(context), arguments_);
+ return $C2($V("objc_msgSend"), self_, selector->Replace(context), arguments_);
}
CYExpression *CYSendSuper::Replace(CYContext &context) {