Changeset 4cb8c8 in git


Ignore:
Timestamp:
Apr 1, 2020, 8:39:57 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
aec21088ae2dbaf6005ab178b79f3970e39e7d29
Parents:
52558a6b3a0a415be47b13181276001350a30b8e
Message:
fix: mod_init if no HAVE_PYTHON
Location:
Singular/dyn_modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/pyobject/pyobject.cc

    r52558a r4cb8c8  
    1414
    1515#include "kernel/mod2.h"
    16 #ifdef HAVE_PYTHON
    1716
    1817#include "omalloc/omalloc.h"
     
    3029#include "Singular/mod_lib.h"
    3130
     31#ifdef HAVE_PYTHON
    3232#include <Python.h>
    3333
     
    741741}
    742742#undef PYOBJECT_ADD_C_PROC
     743#else
     744extern "C" int SI_MOD_INIT(pyobject)(SModulFunctions* psModulFunctions)
     745{
     746  PrintS("no pyobject support\n");
     747  return MAX_TOK;
     748}
    743749
    744750#endif /* HAVE_PYTHON */
  • Singular/dyn_modules/python/python_module.cc

    r52558a r4cb8c8  
    11#include "kernel/mod2.h"
    2 #ifdef HAVE_PYTHON_MOD
    32#include <stdlib.h>
    43#include <stdio.h>
     
    87#include <unistd.h>
    98#include <sys/stat.h>
    10 #include <boost/python.hpp>
    11 #include <Python.h>
    129#include "Singular/tok.h"
    1310#include "kernel/structs.h"
     
    1916#include "omalloc/omalloc.h"
    2017
    21 #include <stdio.h>
    22 #include <stdlib.h>
    23 #include <string.h>
    2418#include <time.h>
     19#if defined(HAVE_PYTHON_MOD) && defined(HAVE_PYTHON)
     20#include <boost/python.hpp>
     21#include <Python.h>
    2522#include <Python.h>
    2623#include "wrapper.h"
     
    8279  return MAX_TOK;
    8380}
     81#else
     82extern "C" int SI_MOD_INIT(python_module)(SModulFunctions* psModulFunctions)
     83{
     84  PrintS("no python_mod support\n");
     85  return MAX_TOK;
     86}
    8487#endif
Note: See TracChangeset for help on using the changeset viewer.