Mercurial > pymonkey
diff object.c @ 21:fc04e5f1c675
Changed object constructor to take a context instead of a runtime.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 28 Jun 2009 20:40:18 -0700 |
parents | f3223debd70b |
children | 988a8998c75f |
line wrap: on
line diff
--- a/object.c Sun Jun 28 20:19:39 2009 -0700 +++ b/object.c Sun Jun 28 20:40:18 2009 -0700 @@ -1,4 +1,5 @@ #include "object.h" +#include "runtime.h" JSClass PYM_JS_ObjectClass = { "PymonkeyObject", JSCLASS_GLOBAL_FLAGS, @@ -66,14 +67,14 @@ 0, /* tp_new */ }; -PYM_JSObject *PYM_newJSObject(PYM_JSRuntimeObject *runtime, +PYM_JSObject *PYM_newJSObject(PYM_JSContextObject *context, JSObject *obj) { PYM_JSObject *object = PyObject_New(PYM_JSObject, &PYM_JSObjectType); if (object == NULL) return NULL; - object->runtime = runtime; + object->runtime = context->runtime; Py_INCREF(object->runtime); object->obj = obj;