view object.h @ 40:8a7abd0bb48d

Renamed PYM_newJSFunction() to PYM_newJSFunctionFromCallable(). PYM_newJSObject() now returns objects of type PYM_JSFunctionType as needed.
author Atul Varma <varmaa@toolness.com>
date Fri, 03 Jul 2009 20:04:01 -0700
parents d4efcbb06964
children bc4263c6ae82
line wrap: on
line source

#ifndef PYM_OBJECT_H
#define PYM_OBJECT_H

#include "context.h"

#include <jsapi.h>
#include <Python/Python.h>

extern JSClass PYM_JS_ObjectClass;

typedef struct {
  PyObject_HEAD
  PYM_JSRuntimeObject *runtime;
  JSObject *obj;
  jsid uniqueId;
} PYM_JSObject;

extern PyTypeObject PYM_JSObjectType;

extern PYM_JSObject *
PYM_newJSObject(PYM_JSContextObject *context, JSObject *obj,
                PYM_JSObject *subclass);

#endif