diff pymonkey.c @ 5:aae78eac86d6

Added support for booleans.
author Atul Varma <varmaa@toolness.com>
date Sun, 28 Jun 2009 12:47:30 -0700
parents 2711b636f8e6
children 42f57789f84f
line wrap: on
line diff
--- a/pymonkey.c	Sun Jun 28 12:43:02 2009 -0700
+++ b/pymonkey.c	Sun Jun 28 12:47:30 2009 -0700
@@ -20,6 +20,12 @@
     return PyFloat_FromDouble(*doubleRef);
   }
 
+  if (value == JSVAL_FALSE)
+    Py_RETURN_FALSE;
+
+  if (value == JSVAL_TRUE)
+    Py_RETURN_TRUE;
+
   if (JSVAL_IS_NULL(value)) {
     Py_INCREF(Py_None);
     return Py_None;