No particular reason, I am still learning all of the helper methods, so
jsval_to_std_string is probably better


On Wed, Feb 26, 2014 at 12:53 AM, James Chen <notifications@github.com>wrote:

> In cocos/scripting/javascript/bindings/network/jsb_socketio.cpp:
>
> > +	return false;
> > +
> > +}
> > +
> > +static bool _js_set_SIOClient_tag(JSContext* cx, JS::HandleObject obj, JS::HandleId id, bool strict, JS::MutableHandleValue vp)
> > +{
> > +     CCLOG("JSB SocketIO.setTag method called");
> > +	JSObject* jsobj = obj.get();
> > +	js_proxy_t *proxy = jsb_get_js_proxy(jsobj);
> > +	SIOClient* cobj = (SIOClient *)(proxy ? proxy->ptr : NULL);
> > +	JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object");
> > +	
> > +	if (cobj) {
> > +		const char *out = "";
> > +
> > +		jsval_to_charptr(cx, vp, &out);
>
> Why not to use jsval_to_std_string?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/cocos2d/cocos2d-x/pull/5471/files#r10069216>
> .
>