Message239117
| Author |
Bob |
| Recipients |
Bob, doko, larry, mark.dickinson, mattip, meador.inge, python-dev, rkuska, steve.dower |
| Date |
2015年03月24日.12:02:31 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1427198551.95.0.018883780085.issue20160@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I was looking into http://lists.cs.uiuc.edu/pipermail/llvmbugs/2012-September/025152.html 'Use of libclang python bindings on Windows 7 64 bit fails with memory access violation'
It appears to be 90% fixed with this patch, but I believe there is still a problem when structs are passed back though a callback function.
Could this be the correct addition to fix it?
in ffi_prep_incoming_args_SYSV() _ctypes\libffi_msvc\ffi.c(line 377)
/* because we're little endian, this is what it turns into. */
+#if _WIN64
+ if ((*p_arg)->type == FFI_TYPE_STRUCT && z > 8)
+ {
+ z = 8;
+ *p_argv = *(void**)argp;
+ }
+ else
+ {
+ *p_argv = (void*)argp;
+ }
+#else
*p_argv = (void*)argp;
+#endif |
|