Commit 5b84311d authored by Michael Droettboom's avatar Michael Droettboom

Just use pointer to bound method name, since we keep object around, it shouldn't die

parent dda6557b
......@@ -416,12 +416,10 @@ JsProxy_cnew(int idobj)
//
// A special class for bound methods
const size_t BOUND_METHOD_NAME_SIZE = 256;
typedef struct
{
PyObject_HEAD int this_;
char name[BOUND_METHOD_NAME_SIZE];
const char* name;
} JsBoundMethod;
static void
......@@ -469,7 +467,7 @@ JsBoundMethod_cnew(int this_, const char* name)
JsBoundMethod* self;
self = (JsBoundMethod*)JsBoundMethodType.tp_alloc(&JsBoundMethodType, 0);
self->this_ = hiwire_incref(this_);
strncpy(self->name, name, BOUND_METHOD_NAME_SIZE);
self->name = name;
return (PyObject*)self;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment