source: sasview/realSpaceModeling/geoshapespy/geoshapespymodule/geoshapespymodule.cc @ 60ad1d4e

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 60ad1d4e was f2d6445, checked in by Mathieu Doucet <doucetm@…>, 17 years ago

moving realSpaceModeling to trunk

  • Property mode set to 100644
File size: 937 bytes
RevLine 
[f2d6445]1// -*- C++ -*-
2
3#include <Python.h>
4
5
6#include "exceptions.h"
7#include "bindings.h"
8#include "myutil.h"
9
10
11char pygeoshapespy_module__doc__[] = "";
12
13// Initialization function for the module (*must* be called initgeoshapespy)
14extern "C"
15void
16initgeoshapespy()
17{
18    // create the module and add the functions
19    PyObject * m = Py_InitModule4(
20        "geoshapespy", pygeoshapespy_methods,
21        pygeoshapespy_module__doc__, 0, PYTHON_API_VERSION);
22
23    // get its dictionary
24    PyObject * d = PyModule_GetDict(m);
25
26    // check for errors
27    if (PyErr_Occurred()) {
28        Py_FatalError("can't initialize module geoshapespy");
29    }
30
31    // install the module exceptions
32    pygeoshapespy_runtimeError = PyErr_NewException("geoshapespy.runtime", 0, 0);
33    PyDict_SetItemString(d, "RuntimeException", pygeoshapespy_runtimeError);
34
35        // Seed the random number generator
36        seed_rnd();
37
38    return;
39}
40
41// version
42// $Id$
43
44// End of file
Note: See TracBrowser for help on using the repository browser.