~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Modules/_ctypes/_ctypes.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1889
1889
        }
1890
1890
        fmt = getentry(PyString_AS_STRING(proto));
1891
1891
        if (fmt == NULL) {
1892
 
                Py_DECREF(result);
1893
1892
                PyErr_Format(PyExc_ValueError,
1894
1893
                             "_type_ '%s' not supported",
1895
1894
                             PyString_AS_STRING(proto));
1896
 
                return NULL;
 
1895
                goto error;
1897
1896
        }
1898
1897
 
1899
1898
        stgdict = (StgDictObject *)PyObject_CallObject(
1900
1899
                (PyObject *)&StgDict_Type, NULL);
1901
1900
        if (!stgdict)
1902
 
                return NULL;
 
1901
                goto error;
1903
1902
 
1904
1903
        stgdict->ffi_type_pointer = *fmt->pffi_type;
1905
1904
        stgdict->align = fmt->pffi_type->alignment;
1914
1913
#endif
1915
1914
        if (stgdict->format == NULL) {
1916
1915
                Py_DECREF(result);
 
1916
                Py_DECREF(proto);
1917
1917
                Py_DECREF((PyObject *)stgdict);
1918
1918
                return NULL;
1919
1919
        }