Changeset 9eb3048 in git


Ignore:
Timestamp:
Jul 9, 2013, 10:29:22 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '4bd32dfef92ec9f5ed8dceee82d14318ae147107')
Children:
741c7090dd3b618a24f57b75f1a21c3a19ce119f
Parents:
86919e90eae002225109c1b5b9d94a6544b1a907
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-07-09 22:29:22+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-07-09 22:31:47+02:00
Message:
Minor improvements&fixes to builtins
Location:
Singular
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipid.cc

    r86919e r9eb3048  
    77*/
    88
    9 #include <string.h>
    10 
    119#ifdef HAVE_CONFIG_H
    1210#include "config.h"
    1311#endif /* HAVE_CONFIG_H */
     12
    1413#include <kernel/mod2.h>
     14
    1515#include <omalloc/omalloc.h>
    16 #include <Singular/tok.h>
     16
    1717#include <misc/options.h>
    18 #include <Singular/ipshell.h>
    1918#include <misc/intvec.h>
    20 #include <kernel/febase.h>
     19
    2120#include <coeffs/numbers.h>
    2221#include <coeffs/bigintmat.h>
     22
     23#include <polys/matpol.h>
     24#include <polys/monomials/ring.h>
     25
     26#include <kernel/febase.h>
    2327#include <kernel/longrat.h>
    2428#include <kernel/polys.h>
    25 #include <polys/monomials/ring.h>
    2629#include <kernel/ideals.h>
    27 #include <polys/matpol.h>
     30#include <kernel/syz.h>
     31
     32#include <Singular/tok.h>
     33#include <Singular/ipshell.h>
    2834#include <Singular/lists.h>
    2935#include <Singular/attrib.h>
    3036#include <Singular/links/silink.h>
    31 #include <kernel/syz.h>
    3237#include <Singular/ipid.h>
    3338#include <Singular/blackbox.h>
     
    3641#include <polys/mod_raw.h>
    3742#endif /* HAVE_DYNAMIC_LOADING */
     43
     44#include <string.h>
    3845
    3946omBin sip_command_bin = omGetSpecBin(sizeof(sip_command));
  • Singular/iplib.cc

    r86919e r9eb3048  
    733733}
    734734
    735 int staticdemo_mod_init(SModulFunctions*){ PrintS("init of staticdemo\n"); }
     735int staticdemo_mod_init(SModulFunctions*){ PrintS("init of staticdemo\n"); return (0); }
    736736
    737737#define SI_GET_BUILTIN_MOD_INIT(name) \
    738   int name##_mod_init(SModulFunctions*); \
    739   if (strcmp(libname, #name ".so") == 0) {  return name##_mod_init; }
     738  int SI_MOD_INIT(name)(SModulFunctions*); \
     739  if (strcmp(libname, #name ".so") == 0) {  return SI_MOD_INIT(name); }
    740740
    741741
     
    11091109  return TRUE;
    11101110#else
     1111/*
    11111112  typedef int (*fktn_t)(int(*iiAddCproc)(const char *libname, const char *procname,
    11121113                               BOOLEAN pstatic,
    11131114                               BOOLEAN(*func)(leftv res, leftv v)));
     1115*/
    11141116  SModulFunc_t fktn;
    11151117  idhdl pl;
     
    11881190  int iiAddCproc(const char *libname, const char *procname, BOOLEAN pstatic,
    11891191                 BOOLEAN(*func)(leftv res, leftv v));
     1192/*
    11901193  typedef int (*fktn_t)(int(*iiAddCproc)(const char *libname, const char *procname,
    11911194                               BOOLEAN pstatic,
    11921195                               BOOLEAN(*func)(leftv res, leftv v)));
     1196*/
    11931197  // SModulFunc_t fktn;
    11941198  idhdl pl;
  • Singular/mod_lib.cc

    r86919e r9eb3048  
    1919#define SI_BUILTIN_LIBSTR(name) (char*) #name ".so",
    2020
    21 char* si_builtin_libs[]={ SI_FOREACH_BUILTIN(SI_BUILTIN_LIBSTR) NULL };
     21const char * const si_builtin_libs[] = { SI_FOREACH_BUILTIN(SI_BUILTIN_LIBSTR) NULL };
    2222
    2323#undef SI_BUILTIN_LIBSTR
  • Singular/mod_lib.h

    r86919e r9eb3048  
    66#include <polys/mod_raw.h>  /* for lib_types */
    77
     8lib_types type_of_LIB(char *newlib, char *fullname);
    89
    910#ifdef EMBED_PYTHON
    10 #define SI_BUILTIN_PYOBJECT(add) add(pyobject)
     11#define SI_BUILTIN_PYOBJECT(add) add(pyobject) add(syzextra)
    1112#else
    1213#define SI_BUILTIN_PYOBJECT(add)
    1314#endif
    14 lib_types type_of_LIB(char *newlib, char *fullname);
    1515
    1616/// Data for @c type_of_LIB to determine built-in modules,
    1717/// use @c add(name) to add built-in library to macro
    1818#define SI_FOREACH_BUILTIN(add)\
    19   add(staticdemo)\
    20   SI_BUILTIN_PYOBJECT(add)
     19    add(staticdemo)\
     20    SI_BUILTIN_PYOBJECT(add)
    2121
    2222#define SI_MOD_INIT(name) name##_mod_init
Note: See TracChangeset for help on using the changeset viewer.