~ubuntu-branches/ubuntu/raring/python3.2/raring

« back to all changes in this revision

Viewing changes to Modules/_ctypes/_ctypes.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2011-09-05 22:01:13 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: package-import@ubuntu.com-20110905220113-gmku3knwah89ojat
Tags: 3.2.2-0ubuntu1
* Python 3.2.2 release.
* Search headers in /usr/include/ncursesw for the curses/panel extensions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2488
2488
    view->ndim = dict->ndim;
2489
2489
    view->shape = dict->shape;
2490
2490
    view->itemsize = self->b_size;
2491
 
    for (i = 0; i < view->ndim; ++i) {
2492
 
        view->itemsize /= dict->shape[i];
 
2491
    if (view->itemsize) {
 
2492
        for (i = 0; i < view->ndim; ++i) {
 
2493
            view->itemsize /= dict->shape[i];
 
2494
        }
2493
2495
    }
2494
2496
    view->strides = NULL;
2495
2497
    view->suboffsets = NULL;