<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -38,7 +38,7 @@ static VALUE evaluate(int argc, VALUE* argv, VALUE self)
   context-&gt;ex = 0;
   memset(context-&gt;msg, 0, MAX_EXCEPTION_MESSAGE_SIZE);
 
-  char* filenamez = RTEST(filename) ? StringValueCStr(filename) : &quot;none&quot;;
+  const char* filenamez = RTEST(filename) ? StringValueCStr(filename) : &quot;none&quot;;
   int linenumi = RTEST(linenum) ? NUM2INT(linenum) : 1;
 
   jsval js;</diff>
      <filename>ext/spidermonkey/context.c</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ static JSTrapStatus interrupt_handler(JSContext *js, JSScript *UNUSED(script),
                                       jsbytecode *pc, jsval *rval, void *rb)
 {
   VALUE self = (VALUE)rb;
-  VALUE rb_bytecode = jsop_to_symbol((uint8)*pc);
+  VALUE rb_bytecode = jsop_to_symbol(*pc);
   VALUE rb_rval = convert_to_ruby(OUR_CONTEXT(js), *rval);
   return NUM2INT(rb_funcall(self, rb_intern(&quot;interrupt_handler&quot;), 2, rb_bytecode, rb_rval));
 }
@@ -21,7 +21,7 @@ static void new_script_hook(JSContext *UNUSED(js),
 {
   VALUE self = (VALUE)rb;
   VALUE rb_filename = rb_str_new2(filename);
-  VALUE rb_linenum  = INT2NUM((int)lineno);
+  VALUE rb_linenum  = UINT2NUM(lineno);
 
   /* FIXME: Pass the rest of this crap to the debugger? */
   rb_funcall(self, rb_intern(&quot;new_script_hook&quot;), 2, rb_filename, rb_linenum);
@@ -39,7 +39,7 @@ static JSTrapStatus debugger_handler(JSContext *js, JSScript *UNUSED(script),
                                      jsbytecode *pc, jsval *rval, void *rb)
 {
   VALUE self = (VALUE)rb;
-  VALUE rb_bytecode = jsop_to_symbol((uint8)*pc);
+  VALUE rb_bytecode = jsop_to_symbol(*pc);
   VALUE rb_rval = convert_to_ruby(OUR_CONTEXT(js), *rval);
   return NUM2INT(rb_funcall(self, rb_intern(&quot;debugger_handler&quot;), 2, rb_bytecode, rb_rval));
 }
@@ -50,8 +50,8 @@ static void source_handler(const char *filename, uintN lineno,
 {
   VALUE self = (VALUE)rb;
   VALUE rb_filename = rb_str_new2(filename);
-  VALUE rb_lineno   = INT2NUM((int)lineno);
-  VALUE rb_str      = rb_str_new((char *)str, (int)length);
+  VALUE rb_lineno   = UINT2NUM(lineno);
+  VALUE rb_str      = rb_str_new((char *)str, (signed)(length * sizeof(jschar)));
 
   rb_funcall(self, rb_intern(&quot;source_handler&quot;), 3, rb_filename, rb_lineno, rb_str);
 }
@@ -92,7 +92,7 @@ static JSTrapStatus throw_hook(JSContext *js, JSScript *UNUSED(script),
                                jsbytecode *pc, jsval *rval, void *rb)
 {
   VALUE self = (VALUE)rb;
-  VALUE rb_bytecode = jsop_to_symbol((uint8)*pc);
+  VALUE rb_bytecode = jsop_to_symbol(*pc);
   VALUE rb_rval = convert_to_ruby(OUR_CONTEXT(js), *rval);
   return NUM2INT(rb_funcall(self, rb_intern(&quot;throw_hook&quot;), 2, rb_bytecode, rb_rval));
 }</diff>
      <filename>ext/spidermonkey/debugger.c</filename>
    </modified>
    <modified>
      <diff>@@ -60,7 +60,7 @@ static VALUE parse_io(int argc, VALUE *argv, VALUE klass) {
       NULL,
       chars,
       length,
-      NULL, filenamez, linenumi));
+      NULL, filenamez, (unsigned)linenumi));
 
   context-&gt;node = js_ParseScript(context-&gt;js, 
       JS_NewObject(context-&gt;js, NULL, NULL, NULL),
@@ -322,7 +322,7 @@ static VALUE data_pn_extra(VALUE self) {
 
   Data_Get_Struct(self, ImmutableNodeContext, ctx);
 
-  return INT2NUM(ctx-&gt;node-&gt;pn_extra);
+  return UINT2NUM(ctx-&gt;node-&gt;pn_extra);
 }
 
 /*
@@ -477,14 +477,14 @@ static VALUE children(VALUE self) {
   return children;
 }
 
-VALUE jsop_to_symbol(uint8 jsop)
+VALUE jsop_to_symbol(JSUint32 jsop)
 {
   switch(jsop) {
     &lt;% jsops.each do |jsop| %&gt;
     case &lt;%= jsop %&gt;: return ID2SYM(rb_intern(&quot;&lt;%= jsop.downcase %&gt;&quot;));
     &lt;% end %&gt;
   }
-  return INT2NUM(jsop);
+  return UINT2NUM(jsop);
 }
 
 void init_Johnson_SpiderMonkey_Immutable_Node(VALUE spidermonkey)</diff>
      <filename>ext/spidermonkey/immutable_node.c.erb</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,7 @@ typedef struct {
   JSRuntime * runtime;
 } ImmutableNodeContext;
 
-VALUE jsop_to_symbol(uint8 jsop);
+VALUE jsop_to_symbol(JSUint32 jsop);
 void init_Johnson_SpiderMonkey_Immutable_Node(VALUE spidermonkey);
 
 #endif</diff>
      <filename>ext/spidermonkey/immutable_node.h</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@
 
 #define OUR_CONTEXT(js_context) \
   ({ \
-    const OurContext* _context; \
+    OurContext* _context; \
     const VALUE _ruby_context = (VALUE)JS_GetContextPrivate(js_context); \
     Data_Get_Struct(_ruby_context, OurContext, _context); \
     _context; \
@@ -19,7 +19,7 @@
   const int _jroot_cleans = (cleancount); \
   void (*_jroot_cleanup[_jroot_cleans])(OurContext*, void*); \
   void* _jroot_cleanup_data[_jroot_cleans]; \
-  OurContext* _jroot_context = (context); \
+  OurContext* const _jroot_context = (context); \
   int _jroot_cleanidx = 0;
 
 #define PREPARE_JROOTS(context, cleancount) \</diff>
      <filename>ext/spidermonkey/jroot.h</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@
 #include &quot;context.h&quot;
 #include &quot;error.h&quot;
 #include &quot;ruby_land_proxy.h&quot;
+#include &quot;debugger.h&quot;
 #include &quot;immutable_node.h&quot;
 
 void Init_spidermonkey()</diff>
      <filename>ext/spidermonkey/spidermonkey.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f9cd70695d60c0c3519e95728214f96f0c7669a2</id>
    </parent>
  </parents>
  <author>
    <name>Matthew Draper</name>
    <email>matthew@trebex.net</email>
  </author>
  <url>http://github.com/jbarnette/johnson/commit/d65c083ae1551c7269b9ea7c0f1625798abcf939</url>
  <id>d65c083ae1551c7269b9ea7c0f1625798abcf939</id>
  <committed-date>2008-05-23T22:03:43-07:00</committed-date>
  <authored-date>2008-05-23T22:03:43-07:00</authored-date>
  <message>Ask, and ye shall receive... cleaned up some warnings.

I can't work out what's going on with jsbytecode/uint8 vs JSUint32 in
jsop_to_symbol, but this seems to make everything happy.</message>
  <tree>83dd191ca59c66d2cb95119f7e92dd79944ac63b</tree>
  <committer>
    <name>Matthew Draper</name>
    <email>matthew@trebex.net</email>
  </committer>
</commit>
