Mercurial > pymonkey
annotate object.h @ 37:d4efcbb06964
Added a new PYM_JSFunction type, PYM_JSContext.define_property(), and PYM_JSContext.new_function(). Also fixed a memory leak.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 02 Jul 2009 22:42:31 -0700 |
parents | 951ad1b15587 |
children | bc4263c6ae82 |
rev | line source |
---|---|
13 | 1 #ifndef PYM_OBJECT_H |
2 #define PYM_OBJECT_H | |
3 | |
21
fc04e5f1c675
Changed object constructor to take a context instead of a runtime.
Atul Varma <varmaa@toolness.com>
parents:
19
diff
changeset
|
4 #include "context.h" |
13 | 5 |
6 #include <jsapi.h> | |
7 #include <Python/Python.h> | |
8 | |
9 extern JSClass PYM_JS_ObjectClass; | |
10 | |
11 typedef struct { | |
12 PyObject_HEAD | |
13 PYM_JSRuntimeObject *runtime; | |
14 JSObject *obj; | |
23
951ad1b15587
The hashtable of reflected JS objects now uses a JS_DHashTable instead of a PyDict. Also removed weakref-ability of the JSObject class since it didn't make any sense to use Python's weakref support for JSObjects.
Atul Varma <varmaa@toolness.com>
parents:
22
diff
changeset
|
15 jsid uniqueId; |
13 | 16 } PYM_JSObject; |
17 | |
18 extern PyTypeObject PYM_JSObjectType; | |
19 | |
19
fbb9a61fa030
Moved context creation code into its own public function in context.c.
Atul Varma <varmaa@toolness.com>
parents:
18
diff
changeset
|
20 extern PYM_JSObject * |
37
d4efcbb06964
Added a new PYM_JSFunction type, PYM_JSContext.define_property(), and PYM_JSContext.new_function(). Also fixed a memory leak.
Atul Varma <varmaa@toolness.com>
parents:
23
diff
changeset
|
21 PYM_newJSObject(PYM_JSContextObject *context, JSObject *obj, |
d4efcbb06964
Added a new PYM_JSFunction type, PYM_JSContext.define_property(), and PYM_JSContext.new_function(). Also fixed a memory leak.
Atul Varma <varmaa@toolness.com>
parents:
23
diff
changeset
|
22 PYM_JSObject *subclass); |
19
fbb9a61fa030
Moved context creation code into its own public function in context.c.
Atul Varma <varmaa@toolness.com>
parents:
18
diff
changeset
|
23 |
13 | 24 #endif |