File: test_numeric_weakref.py

package info (click to toggle)
python-enable 3.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,392 kB
  • ctags: 17,135
  • sloc: cpp: 79,151; python: 29,601; makefile: 2,926; sh: 43
file content (14 lines) | stat: -rw-r--r-- 398 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import sys

import weave
from Numeric import array
import distutils.errors

try:
    a = array([0])
    weave.inline("((PyArrayObject*)py_a)->weakreflist;",['a'],compiler='gcc',force=1,verbose=0)
    sys.exit(0)
except distutils.errors.CompileError:
    # We don't return 1 b/c that is the same thing that os.system returns
    # if it couldn't locate/execute this file.
    sys.exit(10)