Commits

Anonymous committed 179ca2b

remove object.*

  • Participants
  • Parent commits 89ef2c8

Comments (0)

Files changed (2)

File src/object.c

-#include <EXTERN.h>
-#include <perl.h>
-
-#include "Python.h"
-#include "object.h"
-
-PyObject * 
-newSvRV_Object(PerlInterpreter *my_perl, SV *sv)
-{
-    PERL_SET_CONTEXT(my_perl);
-    SvRV_Object *self;
-    self = PyObject_NEW(SvRV_Object, &SvRV_Type);
-    if (self == NULL)
-	    return NULL;
-    self->sv = SvREFCNT_inc(sv);
-    self->perl = my_perl;
-    return (PyObject *)self;
-}
-
-static void
-svrv_dealloc(SvRV_Object *self)
-{
-    PerlInterpreter *my_perl;
-    my_perl = self->perl;
-    PERL_SET_CONTEXT(my_perl);
-    SvREFCNT_dec(self->sv);
-	Py_TYPE(self)->tp_free(self);
-}
-
-
-PyTypeObject SvRV_Type = {
-	PyVarObject_HEAD_INIT(NULL, 0)
-	"PerlRef",					/* tp_name */
-	sizeof(SvRV_Object),				/* tp_basicsize */
-	0,						/* tp_itemsize */
-	(destructor)svrv_dealloc,			/* tp_dealloc */
-	0,						/* tp_print */
-	0,						/* tp_getattr */
-	0,						/* tp_setattr */
-	0,						/* tp_compare */
-	0,						/* tp_repr */
-	0,						/* tp_as_number */
-	0,						/* tp_as_sequence */
-	0,						/* tp_as_mapping */
-	0,						/* tp_hash */
-	0,              				/* tp_call */
-	0,						/* tp_str */
-	PyObject_GenericGetAttr,			/* tp_getattro */
-	0,						/* tp_setattro */
-	0,						/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT,				/* tp_flags */
-	0,					/* tp_doc */
-	0,						/* tp_traverse */
-	0,						/* tp_clear */
-	0,						/* tp_richcompare */
-	0,						/* tp_weaklistoffset */
-	0,						/* tp_iter */
-	0,						/* tp_iternext */
-    /*svrv_method*/0,  				/* tp_methods */
-	0,						/* tp_members */
-	0,				/* tp_getset */
-	0,						/* tp_base */
-	0,						/* tp_dict */
-	0,						/* tp_descr_get */
-	0,						/* tp_descr_set */
-	0,						/* tp_dictoffset */
-	0,						/* tp_init */
-	0,						/* tp_alloc */
-	0,					/* tp_new */
-	0,						/* tp_free */
-};
-

File src/object.h

-
-typedef struct {
-    PyObject_HEAD
-    SV *sv;
-    PerlInterpreter *perl;
-} SvRV_Object;
-
-
-extern PyTypeObject SvRV_Type;
-
-#define PySvRV_Check(v)  ((v)->ob_type == &SvRV_Type)
-//#define SVRV_RV(v)     (((PySVRV*)(v))->rv)
-
-PyObject * newSvRV_Object(PerlInterpreter *my_perl, SV *sv);
-
-