~ubuntu-branches/ubuntu/natty/python3.1/natty-security

« back to all changes in this revision

Viewing changes to Modules/fpetestmodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-07-06 16:52:42 UTC
  • mfrom: (1.2.1 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100706165242-2xv4i019r3et6c0j
Tags: 3.1.2+20100706-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.
  - Add debian/patches/overwrite-semaphore-check for Lucid buildds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
     ---------------------------------------------------------------------  
3
 
    /                       Copyright (c) 1996.                           \ 
 
2
     ---------------------------------------------------------------------
 
3
    /                       Copyright (c) 1996.                           \
4
4
   |          The Regents of the University of California.                 |
5
5
   |                        All rights reserved.                           |
6
6
   |                                                                       |
32
32
   |   opinions  of authors expressed herein do not necessarily state or   |
33
33
   |   reflect those of the United States Government or  the  University   |
34
34
   |   of  California,  and shall not be used for advertising or product   |
35
 
    \  endorsement purposes.                                              / 
36
 
     ---------------------------------------------------------------------  
 
35
    \  endorsement purposes.                                              /
 
36
     ---------------------------------------------------------------------
37
37
*/
38
38
 
39
39
/*
40
 
                  Floating point exception test module.
 
40
                  Floating point exception test module.
41
41
 
42
42
 */
43
43
 
55
55
static void printerr(double);
56
56
 
57
57
static PyMethodDef fpetest_methods[] = {
58
 
    {"test",             (PyCFunction) test,             METH_VARARGS},
 
58
    {"test",             (PyCFunction) test,             METH_VARARGS},
59
59
    {0,0}
60
60
};
61
61
 
174
174
}
175
175
 
176
176
static struct PyModuleDef fpetestmodule = {
177
 
        PyModuleDef_HEAD_INIT,
178
 
        "fpetest",
179
 
        NULL,
180
 
        -1,
181
 
        fpetest_methods,
182
 
        NULL,
183
 
        NULL,
184
 
        NULL,
185
 
        NULL
 
177
    PyModuleDef_HEAD_INIT,
 
178
    "fpetest",
 
179
    NULL,
 
180
    -1,
 
181
    fpetest_methods,
 
182
    NULL,
 
183
    NULL,
 
184
    NULL,
 
185
    NULL
186
186
};
187
187
 
188
188
PyMODINIT_FUNC PyInit_fpetest(void)
191
191
 
192
192
    m = PyModule_Create(&fpetestmodule);
193
193
    if (m == NULL)
194
 
        return NULL;
 
194
    return NULL;
195
195
    d = PyModule_GetDict(m);
196
196
    fpe_error = PyErr_NewException("fpetest.error", NULL, NULL);
197
197
    if (fpe_error != NULL)
198
 
            PyDict_SetItemString(d, "error", fpe_error);
 
198
        PyDict_SetItemString(d, "error", fpe_error);
199
199
    return m;
200
200
}