Packages/Dead/lats/Src/slatsmodule.c
void
initslats()
{
    PyObject *m, *d;
    import_array();
    /* create the module and add the functions */
    m = Py_InitModule("slats", slats_methods);        /* registration hook */

    /* add symbolic constants to the module */
    d = SlatsModuleDict = PyModule_GetDict(m);
    SlatsErrorObject = Py_BuildValue("s", "LATS error");
    PyDict_SetItemString(d, "error", SlatsErrorObject);      /* export exception */

    DefineLongConstant(d, "Pcmdi", (long)LATS_GDT);
    DefineLongConstant(d, "GDT", (long)LATS_GDT);
    DefineLongConstant(d, "GDTRel", (long)LATS_GDT_REL);
    DefineLongConstant(d, "GradsGrib", (long)LATS_GRADS_GRIB);
    DefineLongConstant(d, "GribOnly", (long)LATS_GRIB_ONLY);
    DefineLongConstant(d, "Coards", (long)LATS_COARDS);

    DefineLongConstant(d, "Standard", (long)LATS_STANDARD);
    DefineLongConstant(d, "Gregorian", (long)LATS_STANDARD);
    DefineLongConstant(d, "Julian", (long)LATS_JULIAN);
    DefineLongConstant(d, "Noleap", (long)LATS_NOLEAP);
    DefineLongConstant(d, "Calendar360", (long)LATS_360);
    DefineLongConstant(d, "Clim", (long)LATS_CLIM);
    DefineLongConstant(d, "ClimLeap", (long)LATS_CLIMLEAP);
    DefineLongConstant(d, "Clim360", (long)LATS_CLIM360);
    
    DefineLongConstant(d, "Yearly", (long)LATS_YEARLY);
    DefineLongConstant(d, "Monthly", (long)LATS_MONTHLY);
    DefineLongConstant(d, "MonthlyTableComp", (long)LATS_MONTHLY_TABLE_COMP);
    DefineLongConstant(d, "Weekly", (long)LATS_WEEKLY);
    DefineLongConstant(d, "Daily", (long)LATS_DAILY);
    DefineLongConstant(d, "Hourly", (long)LATS_HOURLY);
    DefineLongConstant(d, "ForecastHourly", (long)LATS_FORECAST_HOURLY);
    DefineLongConstant(d, "Fixed", (long)LATS_FIXED);

    DefineLongConstant(d, "LatsFloat", (long)LATS_FLOAT);
    DefineLongConstant(d, "LatsInt", (long)LATS_FIXED);

    DefineLongConstant(d, "Average", (long)LATS_AVERAGE);
    DefineLongConstant(d, "Instant", (long)LATS_INSTANT);
    DefineLongConstant(d, "Accum", (long)LATS_ACCUM);
    DefineLongConstant(d, "OtherTimeStat", (long)LATS_OTHER_TIME_STAT);
    
    DefineLongConstant(d, "Gaussian", (long)LATS_GAUSSIAN);
    DefineLongConstant(d, "Linear", (long)LATS_LINEAR);
    DefineLongConstant(d, "Generic", (long)LATS_GENERIC);
    
    DefineLongConstant(d, "SingleLevel", (long)LATS_SINGLE_LEVEL);
    DefineLongConstant(d, "MultiLevel", (long)LATS_MULTI_LEVEL);

    DefineLongConstant(d, "UpDirection", (long)LATS_UP);
    DefineLongConstant(d, "DownDirection", (long)LATS_DOWN);

    /* check for errors */
    if (PyErr_Occurred())
        Py_FatalError("can't initialize module slats");

    /* Return on fatal errors */
    lats_fatal=0;
}
/******************************************************************************
* INITIALIZATION FUNCTION (IMPORT-TIME)
*
* Initialization function for the module. Called on first "import slats" in 
* a Python program. The function is usually called "initslats": this name's
* added to the built-in module table in config.c statically (if added to file
* Module/Setup), or called when the module's loaded dynamically as a shareable 
* object-file found on PYTHONPATH. File and function names matter if dynamic.
******************************************************************************/
INITIALIZATION FUNCTION (IMPORT-TIME)
Initialization function for the module. Called on first "import slats" in
a Python program. The function is usually called "initslats": this name's
added to the built-in module table in config.c statically (if added to file
Module/Setup), or called when the module's loaded dynamically as a shareable
object-file found on PYTHONPATH. File and function names matter if dynamic.
INITIALIZATION FUNCTION ( IMPORT - TIME ) Initialization function for the module . Called on first " import slats " in a Python program . The function is usually called " initslats " : this name ' s added to the built - in module table in config . c statically ( if added to file Module / Setup ) or called when the module ' s loaded dynamically as a shareable object - file found on PYTHONPATH . File and function names matter if dynamic .
void
initslats()
{
    PyObject *m, *d;
    import_array();
    m = Py_InitModule("slats", slats_methods);        
    d = SlatsModuleDict = PyModule_GetDict(m);
    SlatsErrorObject = Py_BuildValue("s", "LATS error");
    PyDict_SetItemString(d, "error", SlatsErrorObject);      
    DefineLongConstant(d, "Pcmdi", (long)LATS_GDT);
    DefineLongConstant(d, "GDT", (long)LATS_GDT);
    DefineLongConstant(d, "GDTRel", (long)LATS_GDT_REL);
    DefineLongConstant(d, "GradsGrib", (long)LATS_GRADS_GRIB);
    DefineLongConstant(d, "GribOnly", (long)LATS_GRIB_ONLY);
    DefineLongConstant(d, "Coards", (long)LATS_COARDS);
    DefineLongConstant(d, "Standard", (long)LATS_STANDARD);
    DefineLongConstant(d, "Gregorian", (long)LATS_STANDARD);
    DefineLongConstant(d, "Julian", (long)LATS_JULIAN);
    DefineLongConstant(d, "Noleap", (long)LATS_NOLEAP);
    DefineLongConstant(d, "Calendar360", (long)LATS_360);
    DefineLongConstant(d, "Clim", (long)LATS_CLIM);
    DefineLongConstant(d, "ClimLeap", (long)LATS_CLIMLEAP);
    DefineLongConstant(d, "Clim360", (long)LATS_CLIM360);
    DefineLongConstant(d, "Yearly", (long)LATS_YEARLY);
    DefineLongConstant(d, "Monthly", (long)LATS_MONTHLY);
    DefineLongConstant(d, "MonthlyTableComp", (long)LATS_MONTHLY_TABLE_COMP);
    DefineLongConstant(d, "Weekly", (long)LATS_WEEKLY);
    DefineLongConstant(d, "Daily", (long)LATS_DAILY);
    DefineLongConstant(d, "Hourly", (long)LATS_HOURLY);
    DefineLongConstant(d, "ForecastHourly", (long)LATS_FORECAST_HOURLY);
    DefineLongConstant(d, "Fixed", (long)LATS_FIXED);
    DefineLongConstant(d, "LatsFloat", (long)LATS_FLOAT);
    DefineLongConstant(d, "LatsInt", (long)LATS_FIXED);
    DefineLongConstant(d, "Average", (long)LATS_AVERAGE);
    DefineLongConstant(d, "Instant", (long)LATS_INSTANT);
    DefineLongConstant(d, "Accum", (long)LATS_ACCUM);
    DefineLongConstant(d, "OtherTimeStat", (long)LATS_OTHER_TIME_STAT);
    DefineLongConstant(d, "Gaussian", (long)LATS_GAUSSIAN);
    DefineLongConstant(d, "Linear", (long)LATS_LINEAR);
    DefineLongConstant(d, "Generic", (long)LATS_GENERIC);
    DefineLongConstant(d, "SingleLevel", (long)LATS_SINGLE_LEVEL);
    DefineLongConstant(d, "MultiLevel", (long)LATS_MULTI_LEVEL);
    DefineLongConstant(d, "UpDirection", (long)LATS_UP);
    DefineLongConstant(d, "DownDirection", (long)LATS_DOWN);
    if (PyErr_Occurred())
        Py_FatalError("can't initialize module slats");
    lats_fatal=0;
}
void initslats ( ) { PyObject * m , * d ; import_array ( ) ; m = Py_InitModule ( " " , slats_methods ) ; d = SlatsModuleDict = PyModule_GetDict ( m ) ; SlatsErrorObject = Py_BuildValue ( " " , " " ) ; PyDict_SetItemString ( d , " " , SlatsErrorObject ) ; DefineLongConstant ( d , " " , ( long ) LATS_GDT ) ; DefineLongConstant ( d , " " , ( long ) LATS_GDT ) ; DefineLongConstant ( d , " " , ( long ) LATS_GDT_REL ) ; DefineLongConstant ( d , " " , ( long ) LATS_GRADS_GRIB ) ; DefineLongConstant ( d , " " , ( long ) LATS_GRIB_ONLY ) ; DefineLongConstant ( d , " " , ( long ) LATS_COARDS ) ; DefineLongConstant ( d , " " , ( long ) LATS_STANDARD ) ; DefineLongConstant ( d , " " , ( long ) LATS_STANDARD ) ; DefineLongConstant ( d , " " , ( long ) LATS_JULIAN ) ; DefineLongConstant ( d , " " , ( long ) LATS_NOLEAP ) ; DefineLongConstant ( d , " " , ( long ) LATS_360 ) ; DefineLongConstant ( d , " " , ( long ) LATS_CLIM ) ; DefineLongConstant ( d , " " , ( long ) LATS_CLIMLEAP ) ; DefineLongConstant ( d , " " , ( long ) LATS_CLIM360 ) ; DefineLongConstant ( d , " " , ( long ) LATS_YEARLY ) ; DefineLongConstant ( d , " " , ( long ) LATS_MONTHLY ) ; DefineLongConstant ( d , " " , ( long ) LATS_MONTHLY_TABLE_COMP ) ; DefineLongConstant ( d , " " , ( long ) LATS_WEEKLY ) ; DefineLongConstant ( d , " " , ( long ) LATS_DAILY ) ; DefineLongConstant ( d , " " , ( long ) LATS_HOURLY ) ; DefineLongConstant ( d , " " , ( long ) LATS_FORECAST_HOURLY ) ; DefineLongConstant ( d , " " , ( long ) LATS_FIXED ) ; DefineLongConstant ( d , " " , ( long ) LATS_FLOAT ) ; DefineLongConstant ( d , " " , ( long ) LATS_FIXED ) ; DefineLongConstant ( d , " " , ( long ) LATS_AVERAGE ) ; DefineLongConstant ( d , " " , ( long ) LATS_INSTANT ) ; DefineLongConstant ( d , " " , ( long ) LATS_ACCUM ) ; DefineLongConstant ( d , " " , ( long ) LATS_OTHER_TIME_STAT ) ; DefineLongConstant ( d , " " , ( long ) LATS_GAUSSIAN ) ; DefineLongConstant ( d , " " , ( long ) LATS_LINEAR ) ; DefineLongConstant ( d , " " , ( long ) LATS_GENERIC ) ; DefineLongConstant ( d , " " , ( long ) LATS_SINGLE_LEVEL ) ; DefineLongConstant ( d , " " , ( long ) LATS_MULTI_LEVEL ) ; DefineLongConstant ( d , " " , ( long ) LATS_UP ) ; DefineLongConstant ( d , " " , ( long ) LATS_DOWN ) ; if ( PyErr_Occurred ( ) ) Py_FatalError ( " " ) ; lats_fatal = 0 ; }
INITIALIZATION FUNCTION (IMPORT-TIME)
Initialization function for the module.
INITIALIZATION FUNCTION ( IMPORT - TIME ) Initialization function for the module .
/* create the module and add the functions */ /* registration hook */ /* add symbolic constants to the module */ /* export exception */ /* check for errors */ /* Return on fatal errors */