Message77570
> I wonder if a patch for ctypes like this (which is not yet complete)
> could be used to implement this, or MUST it be implemented in C?
For the intended purpose of giving access to raw machine arithmetics, I
would think a C implementation would be required, but Theller's patch is
a good start.
> One difficulty with the patch is that the original ctypes code
> contained a tp_as_number ...
This can be solved by changing the order of bases for c_<type> classes.
See attached.
The next step would be to rewrite _NumberMixin in C. C code can be
limited to methods operating on known c_ types, say ll_add(x, y) to add
two longs and hl_cast(x) to cast short to long with python code taking
care of the dispatch. (What's the latest on the multiple dispatch, BTW?
) |
|
Date |
User |
Action |
Args |
2008-12-10 21:28:08 | belopolsky | set | recipients:
+ belopolsky, arigo, theller, rhettinger, bob.ippolito, mark.dickinson, fredrik_j |
2008-12-10 21:28:08 | belopolsky | set | messageid: <1228944488.14.0.360490442291.issue887237@psf.upfronthosting.co.za> |
2008-12-10 21:28:07 | belopolsky | link | issue887237 messages |
2008-12-10 21:28:06 | belopolsky | create | |
|