Changeset e87d40 in git
- Timestamp:
- Dec 11, 2012, 2:50:20 PM (11 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- bd8204a951e445d6081f81d1727da65972ead678
- Parents:
- 7b9d49ecf5884d5163955044b27dd3eca2dc6b04
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
r7b9d49 re87d40 94 94 #include "walk.h" 95 95 #include <Singular/newstruct.h> 96 96 #include <Singular/pyobject_setup.h> 97 97 98 98 … … 2947 2947 else 2948 2948 2949 /*==== pyobject (or pyobject*, like pyobject.so) force loading python ===*/ 2950 if (strncmp(sys_cmd, "pyobject", 8) == 0) 2951 { 2952 res->rtyp = NONE; 2953 return pyobject_ensure(); 2954 } 2955 else 2949 2956 2950 2957 /*==================== DLL =================*/ -
Singular/pyobject_setup.cc
r7b9d49 re87d40 49 49 void* pyobject_autoload(blackbox* bbx) 50 50 { 51 if (pyobject_load()) return NULL;52 return bbx->blackbox_Init(bbx);51 assume(bbx != NULL); 52 return (pyobject_load()? NULL: bbx->blackbox_Init(bbx)); 53 53 } 54 54 … … 67 67 } 68 68 69 /// Explicitely load, if not loaded already 70 BOOLEAN pyobject_ensure() { 71 72 int tok = -1; 73 blackbox* bbx = (blackboxIsCmd("pyobject", tok) == ROOT_DECL? 74 getBlackboxStuff(tok): (blackbox*)NULL); 75 if (bbx == NULL) return TRUE; 76 return (bbx->blackbox_Init == pyobject_autoload? pyobject_load(): FALSE); 77 } 78 79 80 -
Singular/pyobject_setup.h
r7b9d49 re87d40 17 17 #define SINGULAR_PYOBJECT_SETUP_H 18 18 19 /// initialize blackbox support for @c pyobject; functionilty os autoloaded on demand 19 20 void pyobject_setup(); 20 21 22 /// force leading of pyobject functionality 23 BOOLEAN pyobject_ensure(); 24 21 25 #endif
Note: See TracChangeset
for help on using the changeset viewer.