Permalink
Browse files

Deal with a couple of minor warnings.

  • Loading branch information...
1 parent da692fa commit dc4233670eaa16e0cf241fcdafa511965b8f8b44 @matthewd matthewd committed Apr 21, 2008
@@ -1,6 +1,7 @@
#include "conversions.h"
#include "js_land_proxy.h"
#include "ruby_land_proxy.h"
+#include "error.h"
static JSBool convert_float_or_bignum_to_js(OurContext* context, VALUE float_or_bignum, jsval* retval)
{
@@ -1,4 +1,5 @@
#include "js_land_proxy.h"
+#include "conversions.h"
static JSBool get(JSContext* js_context, JSObject* obj, jsval id, jsval* retval);
static JSBool set(JSContext* context, JSObject* obj, jsval id, jsval* retval);
@@ -91,7 +92,8 @@ static JSBool attribute_p(VALUE self, char* name)
static JSBool indexable_p(VALUE self)
{
- rb_funcall(self, rb_intern("respond_to?"), 1, ID2SYM(rb_intern("[]")));
+ VALUE v = rb_funcall(self, rb_intern("respond_to?"), 1, ID2SYM(rb_intern("[]")));
+ return RTEST(v) ? JS_TRUE : JS_FALSE;
}
static JSBool has_key_p(VALUE self, char* name)
@@ -110,7 +112,6 @@ static JSBool respond_to_p(JSContext* js_context, JSObject* obj, char* name)
Data_Get_Struct(ruby_context, OurContext, context);
VALUE self;
- VALUE symbol = ID2SYM(rb_intern(name));
assert(self = (VALUE)JS_GetInstancePrivate(
context->js, obj, JS_GET_CLASS(context->js, obj), NULL));
@@ -204,7 +205,6 @@ static JSBool get(JSContext* js_context, JSObject* obj, jsval id, jsval* retval)
else if (attribute_p(self, name))
{
- VALUE method = rb_funcall(self, rb_intern("method"), 1, ID2SYM(ruby_id));
return convert_to_js(context, rb_funcall(self, ruby_id, 0), retval);
}
@@ -1,4 +1,6 @@
#include "ruby_land_proxy.h"
+#include "conversions.h"
+#include "error.h"
static VALUE proxy_class = Qnil;
@@ -12,5 +12,6 @@ typedef struct {
JSBool ruby_value_is_proxy(VALUE maybe_proxy);
JSBool unwrap_ruby_land_proxy(OurContext* context, VALUE proxy, jsval* retval);
VALUE make_ruby_land_proxy(OurContext* context, jsval value);
+void init_Johnson_SpiderMonkey_Proxy(VALUE spidermonkey);
#endif

0 comments on commit dc42336

Please sign in to comment.