Bug 841415 - Fix nss_ctypes.py so it works on Darwin. r=bsmith

This commit is contained in:
Antonio M. Amaya 2013-02-14 18:13:34 +01:00
parent 8742f29802
commit 9344a1f60d

View File

@ -63,6 +63,10 @@ PK11PasswordFunc = CFUNCTYPE(c_char_p, c_void_p, PRBool, c_char_p)
# pass the result of this as the wincx parameter when a wincx is required
nss.PK11_SetPasswordFunc.argtypes = [PK11PasswordFunc]
nss.PK11_SetPasswordFunc.restype = None
# Set the return type as *void so Python doesn't touch it
plc.PL_strdup.argtypes = [c_char_p]
plc.PL_strdup.restype = c_void_p
def SetPasswordContext(password):
def callback(slot, retry, arg):
return plc.PL_strdup(password)