Commit 8d33aa2d authored by gsamain's avatar gsamain

amend __new__ test

parent eca0083d
cdef cypclass SomeMemory: cdef cypclass SomeMemory:
int a int a
SomeMemory __new__(self):
o = new SomeMemory() @staticmethod
SomeMemory __new__(void* (*f)()):
o = <SomeMemory> f()
o.a = -2 o.a = -2
return o return o
void* __new__(self, int a): @staticmethod
o = new SomeMemory() void* __new__(void* (*f)(), int a):
o = <SomeMemory> f()
o.a = a o.a = a
return <void*> o return <void*> o
@staticmethod
SomeMemory __alloc__():
return new SomeMemory()
void __init__(self): void __init__(self):
this.a += 1 this.a += 1
......
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