[sword-svn] r2418 - trunk/bindings/swig

benpmorgan at crosswire.org benpmorgan at crosswire.org
Tue May 19 23:50:37 MST 2009


Author: benpmorgan
Date: 2009-05-19 23:50:37 -0700 (Tue, 19 May 2009)
New Revision: 2418

Modified:
   trunk/bindings/swig/swconfig.i
   trunk/bindings/swig/templates.i
Log:
Fix template bug.



Modified: trunk/bindings/swig/swconfig.i
===================================================================
--- trunk/bindings/swig/swconfig.i	2009-05-18 04:08:42 UTC (rev 2417)
+++ trunk/bindings/swig/swconfig.i	2009-05-20 06:50:37 UTC (rev 2418)
@@ -17,9 +17,9 @@
   const char* get(const char* group, const char* entry) {
 	return self->Sections[group][entry].c_str();
   };
-  std::multimap < sword::SWBuf, std::map <sword::SWBuf, sword::SWBuf> >
+  PySectionMap /*std::map < sword::SWBuf, std::multimap <sword::SWBuf, sword::SWBuf> > */
   *getSections() {
-    return (std::multimap < sword::SWBuf, std::map < sword::SWBuf, sword::SWBuf > > *) &self->Sections;
+    return (PySectionMap* /*std::map < sword::SWBuf, std::multimap < sword::SWBuf, sword::SWBuf > > * */) &self->Sections;
   }
 }
 

Modified: trunk/bindings/swig/templates.i
===================================================================
--- trunk/bindings/swig/templates.i	2009-05-18 04:08:42 UTC (rev 2417)
+++ trunk/bindings/swig/templates.i	2009-05-20 06:50:37 UTC (rev 2418)
@@ -4,6 +4,7 @@
 
 %include <std_pair.i>
 %include <std_multimap.i>
+%include <multimapwdef.h>
 
 /*
 Include SWModule and DirEntry here, so that it will be able to appear below
@@ -11,6 +12,7 @@
 %{
 #include "swmodule.h"
 #include "filemgr.h"
+#include "swconfig.h"
 %}
 
 /* 
@@ -22,7 +24,9 @@
 %inline %{
 typedef std::map< sword::SWBuf, sword::SWBuf > AttributeValueMap;
 typedef std::map< sword::SWBuf, AttributeValueMap> AttributeListMap;
-typedef std::map< sword::SWBuf, AttributeListMap> AttributetypeListMap; 
+typedef std::map< sword::SWBuf, AttributeListMap> AttributeTypeListMap; 
+typedef std::multimap < sword::SWBuf, sword::SWBuf, std::less < sword::SWBuf > > PyConfigEntMap;
+typedef std::map < sword::SWBuf, PyConfigEntMap > PySectionMap;
 %}
 
 /* Used by SWModule and SWConfig */
@@ -36,7 +40,12 @@
 %template(AttributeTypeListMap) std::map < sword::SWBuf, AttributeListMap>;
 
 /* Used by SWConfig */
-%template(SectionMapMultiMap) std::multimap < sword::SWBuf, AttributeValueMap >;
+%template(PyConfigEntMap) std::multimap < sword::SWBuf, sword::SWBuf, std::less <sword::SWBuf> >;
+/* %template() std::less <sword::SWBuf>;*/
+%template() std::pair < sword::SWBuf, std::multimap < sword::SWBuf,
+ sword::SWBuf > >/*PyConfigEntMap >*/;
+%template(PySectionMap) std::map < sword::SWBuf, std::multimap < sword::SWBuf,
+ sword::SWBuf > >/*std::map < sword::SWBuf, PyConfigEntMap >*/;
 
 /* Used by SWMgr */
 %template() std::pair<sword::SWBuf, sword::SWModule*>;




More information about the sword-cvs mailing list