This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | eryksun |
|---|---|
| Recipients | Daniel.Standage, amaury.forgeotdarc, belopolsky, eryksun, meador.inge, ned.deily |
| Date | 2014年11月26日.08:13:35 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1416989615.78.0.175218210771.issue22945@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
c_void_p's getfunc returns the address as an integer. In turn, an integer argument gets converted to a C int. This mean you need to a create a new c_void_p from the address for _as_parameter_, e.g. self._as_parameter_ = c_void_p(self.g) Or set restype to a subclass of c_void_p. ctypes won't call the getfunc in this case, e.g. class my_void_p(c_void_p): pass mylib.my_gizmo_create.restype = my_void_p ConvParam https://hg.python.org/cpython/file/ee879c0ffa11/Modules/_ctypes/callproc.c#l613 GetResult https://hg.python.org/cpython/file/ee879c0ffa11/Modules/_ctypes/callproc.c#l903 |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014年11月26日 08:13:35 | eryksun | set | recipients: + eryksun, amaury.forgeotdarc, belopolsky, ned.deily, meador.inge, Daniel.Standage |
| 2014年11月26日 08:13:35 | eryksun | set | messageid: <1416989615.78.0.175218210771.issue22945@psf.upfronthosting.co.za> |
| 2014年11月26日 08:13:35 | eryksun | link | issue22945 messages |
| 2014年11月26日 08:13:35 | eryksun | create | |