Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r472:a13ba8a00ae6
Date: 2012-06-19 22:04 +0200
http://bitbucket.org/cffi/cffi/changeset/a13ba8a00ae6/

Log:    Minor simplification

diff --git a/c/_ffi_backend.c b/c/_ffi_backend.c
--- a/c/_ffi_backend.c
+++ b/c/_ffi_backend.c
@@ -3208,12 +3208,12 @@
             size = cd->c_type->ct_size;
     }
     else if (CTypeDescr_Check(arg)) {
-        if (((CTypeDescrObject *)arg)->ct_size < 0) {
+        size = ((CTypeDescrObject *)arg)->ct_size;
+        if (size < 0) {
             PyErr_Format(PyExc_ValueError, "ctype '%s' is of unknown size",
                          ((CTypeDescrObject *)arg)->ct_name);
             return NULL;
         }
-        size = ((CTypeDescrObject *)arg)->ct_size;
     }
     else {
         PyErr_SetString(PyExc_TypeError,
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to