Message117087
I don't think this should happen by default.
but what the user wants is already possible, by using the from_param() method. For example, the AutoStrParam type converts everything to a string (and a char*):
from ctypes import *
class AutoStrParam(c_char_p):
@classmethod
def from_param(cls, value):
return str(value)
strlen = cdll.LoadLibrary('msvcrt').strlen
strlen.argtypes = [AutoStrParam]
print strlen(None) # "None" -> 4
print strlen(type) # "<type 'type'>" -> 13 |
|
Date |
User |
Action |
Args |
2010-09-21 17:56:51 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, theller, christian.heimes, mattbaas, BreamoreBoy |
2010-09-21 17:56:51 | amaury.forgeotdarc | set | messageid: <1285091811.49.0.420301391412.issue1962@psf.upfronthosting.co.za> |
2010-09-21 17:56:49 | amaury.forgeotdarc | link | issue1962 messages |
2010-09-21 17:56:49 | amaury.forgeotdarc | create | |
|