~jtaylor/ubuntu/precise/python-numpy/multiarch-fix-818867

« back to all changes in this revision

Viewing changes to numpy/f2py/lib/src/pyobj_to_string_len.c

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik, Riku Voipio, Tiziano Zito, Carlos Galisteo, Ondrej Certik
  • Date: 2008-07-08 15:08:16 UTC
  • mfrom: (0.1.21 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080708150816-ekf992jcp2k1eua3
Tags: 1:1.1.0-3
[ Riku Voipio ]
* debian/control: atlas is not available on armel, and after a quick look
  neither on alpha. I'd also suggest dropping
  libatlas-sse-dev|libatlas-sse2-dev|libatlas-3dnow-dev alternative combo
  away, these are potentially dangerous on buildd's. Ondrej: dropped.
  (Closes: #489568)

[ Tiziano Zito ]
* patch: build _dotblas.c when ATLAS is not installed, build-conflict with
  atlas, build-depend on blas+lapack only, as it used to be (Closes: #489726)

[ Carlos Galisteo ]
* debian/control
  - Added Homepage field.

[ Ondrej Certik ]
* Checked the package on i386 and amd64, both with and without atlas, all
  tests run and the numpy package is faster if atlas is around. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
int pyobj_to_string_len(PyObject* obj, f2py_string* value, size_t length) {
2
 
  if (PyString_Check(obj)) {
3
 
    if (strncpy((char*)value,PyString_AS_STRING(obj), length))
4
 
      return 1;
5
 
  }
6
 
  if (!PyErr_Occurred()) {
7
 
    PyErr_SetString(PyExc_TypeError,
8
 
                    "Failed to convert python object to C f2py_string.");
9
 
  }
10
 
  return 0;
 
2
    if (PyString_Check(obj)) {
 
3
        if (strncpy((char*)value,PyString_AS_STRING(obj), length))
 
4
            return 1;
 
5
    }
 
6
    if (!PyErr_Occurred()) {
 
7
        PyErr_SetString(PyExc_TypeError,
 
8
                        "Failed to convert python object to C f2py_string.");
 
9
    }
 
10
    return 0;
11
11
}