/alps/pcitool

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/pci.c

  • Committer: Vasilii Chernov
  • Date: 2016-02-17 10:01:22 UTC
  • mto: This revision was merged to the branch mainline in revision 353.
  • Revision ID: vchernov@inr.ru-20160217100122-ya6pl2mbquzs0zrs
1. Add cmake BUILD_PYTHON_MODULES option.
2. Rename log options getting functions.
3. py:
   - pcilib_init_py() - extract pcilib_py_add_script_dir()
   - pcilib_py_init_script() - extract view-specialized code to
     pcilib_py_get_transform_script_properties()
3. pcilib_open():
   - move pcilib_init_py() to previous position.
   - add extract pcilib_py_add_script_dir()
4. pcilib_script_s - change hash key. Now it is (const char*) and contains 
   script file name with extension
5. pcipywrap:
   - Add pcipywrap.h to remove swig generated file complile warnings
   - remove -includeall swig flag to prevent crash in multi-thread scripts
   - change set python expetion mechanic

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
            pcilib_close(ctx);
145
145
            return NULL;
146
146
        }
 
147
        
 
148
        err = pcilib_init_py(ctx);
 
149
        if (err) {
 
150
            pcilib_error("Error (%i) initializing python subsystem", err);
 
151
            pcilib_close(ctx);
 
152
            return NULL;
 
153
        }
147
154
 
148
155
        ctx->alloc_reg = PCILIB_DEFAULT_REGISTER_SPACE;
149
156
        ctx->alloc_views = PCILIB_DEFAULT_VIEW_SPACE;
185
192
        if (!ctx->model)
186
193
            ctx->model = strdup(model?model:"pci");
187
194
            
188
 
        err = pcilib_init_py(ctx);
 
195
        err = pcilib_py_add_script_dir(ctx);
189
196
        if (err) {
190
 
            pcilib_error("Error (%i) initializing python subsystem", err);
 
197
            pcilib_error("Error (%i) add script path to python path", err);
191
198
            pcilib_close(ctx);
192
199
            return NULL;
193
200
        }