Changeset b9502a in git for Singular/dyn_modules/python/ring_wrap.cc
- Timestamp:
- Feb 28, 2017, 12:28:39 PM (7 years ago)
- Branches:
- (u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
- Children:
- ddf313aa15678b49ae4cbd1aa2881b4a49296061
- Parents:
- 5c773a32c223f8f216df09eef7badedc4d0754a6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/python/ring_wrap.cc
r5c773a rb9502a 2 2 #include <boost/python.hpp> 3 3 #include <kernel/mod2.h> 4 #include <Singular/ipshell.h> 4 5 #include "ring_wrap.h" 5 6 #include "poly_wrap.h" … … 12 13 return boost::python::str(out,strlen(out)); 13 14 } 14 void ring_set(Ring & r)15 void ring_set(Ring & R) 15 16 { 16 //FIXME: only a hack, no solution 17 ring r=R.pimpl.get(); 18 idhdl h=rFindHdl(r,NULL); 19 if (h==NULL) 20 { 17 21 char name_buffer[100]; 18 22 static int ending=0; 19 23 ending++; 20 24 sprintf(name_buffer, "PYTHON_RING_VAR%d",ending); 21 idhdl shadow_hdl=enterid(name_buffer,0,RING_CMD,&IDROOT);22 r.pimpl.get()->ref++;23 shadow_hdl->data.uring=r.pimpl.get();24 rChangeCurrRing(r.pimpl.get());25 currRingHdl=shadow_hdl;26 25 h=enterid(omStrDup(name_buffer),0,RING_CMD,&IDROOT); 26 IDRING(h)=r; 27 r->ref++; 28 } 29 rSetHdl(h); 30 for(int i=myynest;i>=0;i--) iiLocalRing[i]=r; 27 31 } 28 32 void export_ring()
Note: See TracChangeset
for help on using the changeset viewer.