changeset 149:9ac6adc6304b

'caller' key for base stack frame is now None.
author Atul Varma <varmaa@toolness.com>
date Sat, 29 Aug 2009 13:32:33 -0700
parents 0b1020c817b3
children aea82140758c
files src/context.cpp tests/test_pymonkey.py
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/context.cpp	Sat Aug 29 13:30:43 2009 -0700
+++ b/src/context.cpp	Sat Aug 29 13:32:33 2009 -0700
@@ -157,10 +157,11 @@
     }
 
     PyObject *frameDict = Py_BuildValue(
-      "{sOsIsI}",
+      "{sOsIsIsO}",
       "script", pyScript,
       "pc", pc,
-      "lineno", lineno
+      "lineno", lineno,
+      "caller", Py_None
       );
 
     Py_DECREF(pyScript);
--- a/tests/test_pymonkey.py	Sat Aug 29 13:30:43 2009 -0700
+++ b/tests/test_pymonkey.py	Sat Aug 29 13:32:33 2009 -0700
@@ -69,6 +69,7 @@
         self.assertEqual(script.filename, '<string>')
         self.assertEqual(stack_holder[0]['caller']['lineno'], 1)
         self.assertTrue(pc >= 0 and pc < len(buffer(script)))
+        self.assertEqual(stack_holder[0]['caller']['caller'], None)
 
     def testScriptHasFilenameMember(self):
         cx = pymonkey.Runtime().new_context()