[sword-svn] r2954 - trunk/bindings/swig
greg.hellings at crosswire.org
greg.hellings at crosswire.org
Sun Aug 11 00:09:29 MST 2013
Author: greg.hellings
Date: 2013-08-11 00:09:29 -0700 (Sun, 11 Aug 2013)
New Revision: 2954
Added:
trunk/bindings/swig/.deprecations.i.swp
trunk/bindings/swig/.listkey.i.swp
trunk/bindings/swig/.swbuf.i.swp
trunk/bindings/swig/.sword.i.swp
Modified:
trunk/bindings/swig/deprecations.i
trunk/bindings/swig/swbuf.i
trunk/bindings/swig/sword.i
Log:
Clean up SWBuf cast operators
Give first-class status to SWBuf objects
Added: trunk/bindings/swig/.deprecations.i.swp
===================================================================
--- trunk/bindings/swig/.deprecations.i.swp (rev 0)
+++ trunk/bindings/swig/.deprecations.i.swp 2013-08-11 07:09:29 UTC (rev 2954)
@@ -0,0 +1,19 @@
+b0VIM 7.3 ¹1R ºC greg Greg-PC.home ~greg/Source/sword/bindings/swig/deprecations.i utf-8
+ 3210 #"! U tp ? ad ^ v ? ¾ ½ p ? ã ³ R ð
+ ï
+ Â
+ Á
+
+
+ s
+ L
+
+
+ è { F î È ¤
a > è
+ È
+ ª
+
+ i
+ H
+ )
+ ì ¦ l G Ë ª z V 7 6 ï Í ¥ ] 9 ì » v p %ignore sword::VerseKey::Verse; %%%i%i%%ignore sword::VerseKey::Verse; %ignore sword::VerseKey::UpperBound; %ignore sword::VerseKey::TestamentIndex() const; %ignore sword::VerseKey::Testament; %ignore sword::VerseKey::ParseVerseList; %ignore sword::VerseKey::Normalize; %ignore sword::VerseKey::LowerBound; %ignore sword::VerseKey::Headings; %ignore sword::VerseKey::ClearBounds(); %ignore sword::VerseKey::Chapter; %ignore sword::VerseKey::Book; %ignore sword::VerseKey::AutoNormalize; %ignore sword::SWModule::Type; %ignore sword::SWModule::StripText; %ignore sword::SWModule::setKey(SWKey const &); %ignore sword::SWModule::SetKey; %ignore sword::SWModule::RemoveRenderFilter(SWFilter*); %ignore sword::SWModule::ReplaceRenderFilter(SWFilter*, SWFilter*); %ignore sword::SWModule::RenderText; %ignore sword::SWModule::RemoveEncodingFilter(SWFilter*); %ignore sword::SWModule::ReplaceEncodingFilter(SWFilter*, SWFilter*); %ignore sword::SWModule::processEntryAttributes(bool) const; %ignore sword::SWModule::Name; %ignore sword::SWModule::Markup; %ignore sword::SWModule::Lang; %ignore sword::SWModule::KeyText; %ignore sword::SWModule::Key; %ignore sword::SWModule::Index; %ignore sword::SWModule::getSkipConsecutiveLinks(); %ignore sword::SWModule::Error(); %ignore sword::SWModule::Encoding; %ignore sword::SWModule::Display(); %ignore sword::SWModule::Disp; %ignore sword::SWModule::Direction; %ignore sword::SWModule::Description; %ignore sword::SWModule::CreateKey; %ignore sword::SWModule::AddStripFilter(SWFilter*); %ignore sword::SWModule::AddRenderFilter(SWFilter*); %ignore sword::SWModule::AddRawFilter(SWFilter*); %ignore sword::SWModule::AddOptionFilter(SWOptionFilter*); %ignore sword::SWModule::AddEncodingFilter(SWFilter*); %ignore sword::SWKey::Persist(signed char); %ignore sword::SWKey::Persist() const; %ignore sword::SWKey::Error(); %ignore sword::SWDisplay::Display(SWModule&); %ignore sword::StatusReporter::statusUpdate; %ignore sword::XMLTag::operator const char *; %ignore sword::VerseTreeKey::operator const char *; %ignore sword::TreeKeyIdx::operator const char *; %ignore sword::TreeKey::operator const char *; %ignore sword::VerseKey::operator const char *; %ignore sword::ListKey::operator const char *; %ignore sword::SWKey::operator const char *; %ignore sword::SWVersion::operator const char *; %ignore sword::SWModule::operator const char *; /* These are all together */ /* Methods that are deprecated in SWORD and should be ignored. */
\ No newline at end of file
Added: trunk/bindings/swig/.listkey.i.swp
===================================================================
--- trunk/bindings/swig/.listkey.i.swp (rev 0)
+++ trunk/bindings/swig/.listkey.i.swp 2013-08-11 07:09:29 UTC (rev 2954)
@@ -0,0 +1,3 @@
+b0VIM 7.3 ÊùQ" ºC greg Greg-PC.home ~greg/Source/sword/bindings/swig/listkey.i
+ 3210 #"! U tp ad
+ ý è å ä À ~ ^ 8 þ ý ú ð Æ x F } } return dynamic_cast<sword::ListKey*>(o); static sword::ListKey *castTo(sword::SWKey *o) { %extend sword::ListKey { */ } }; return self->SetToElement(element, TOP); virtual char SetToElement(int element) { %extend { /* %include "listkey.h" %ignore sword::ListKey::GetElement; %ignore sword::ListKey::SetToElement; %ignore sword::ListKey::Remove; %ignore sword::ListKey::Count; %ignore sword::ListKey::ClearList; %ignore sword::ListKey::operator<<; %} #include "listkey.h" %{
\ No newline at end of file
Added: trunk/bindings/swig/.swbuf.i.swp
===================================================================
--- trunk/bindings/swig/.swbuf.i.swp (rev 0)
+++ trunk/bindings/swig/.swbuf.i.swp 2013-08-11 07:09:29 UTC (rev 2954)
@@ -0,0 +1,11 @@
+b0VIM 7.3 D7R ºC greg Greg-PC.home ~greg/Source/sword/bindings/swig/swbuf.i utf-8
+ 3210 #"! U tp % ad 7 % ý ê ç æ ° m K ) å Ã ¡ _ = ú
+ Ø
+ «
+ ª
+
+ 7
+
+
+
+ Õ Ô Ó À ¿ ¾ § ~ E ; 8 7 6 ú à ¿ ¬ }; } }; }; }; }; }; } }; }; } return self->charA }; } return self->charAt((unsigned long)pos); char charAt2(unsigned int pos) { %extend sword::SWBuf { %include "swbuf.h" %ignore sword::SWBuf::SWBuf(char, unsigned long); */ * lead to changing of immutable strings!!!! * This would be the default for single character strings passed in. This can /* Ignore this horrible constructor. %ignore sword::SWBuf::charAt(unsigned long); %ignore sword::SWBuf::operator--; %ignore sword::SWBuf::operator=; %ignore sword::SWBuf::operator>>; %ignore sword::SWBuf::operator<<; %ignore sword::SWBuf::operator>; %ignore sword::SWBuf::operator<; %ignore sword::SWBuf::operator>=; %ignore sword::SWBuf::operator<=; %ignore sword::SWBuf::operator-=; %ignore sword::SWBuf::operator+=; %ignore sword::SWBuf::operator!=; %ignore sword::SWBuf::operator==; %ignore sword::SWBuf::operator+; %ignore sword::SWBuf::operator[]; %rename(__str__) sword::SWBuf::operator const char *; %} #include "swbuf.h" %{
\ No newline at end of file
Added: trunk/bindings/swig/.sword.i.swp
===================================================================
--- trunk/bindings/swig/.sword.i.swp (rev 0)
+++ trunk/bindings/swig/.sword.i.swp 2013-08-11 07:09:29 UTC (rev 2954)
@@ -0,0 +1,33 @@
+b0VIM 7.3 m3R@ ºC greg Greg-PC.home ~greg/Source/sword/bindings/swig/sword.i utf-8
+ 3210 #"! U tp j ad 1 õ j ê é Ù » º y x ^ ] K 4 - , ó ò ¬ h D î
+ Ç
+ Æ
+ ´
+ ¡
+
+
+
+
+ H
+ 1
+ 0
+
+
+ í Ú Ù Æ ± n T S ? > ( ö õ ô Ý Ã « j i Q 6 5 ð
+ Ù
+ Ø
+ ×
+ Ä
+ °
+
+
+
+ n
+ m
+ [
+ H
+ 4
+ #
+ "
+
+ ù æ å Î Í ¼ § ¦ x e d P 7 6 ü õ î è ç Õ Ï Å ¡ õ Å d 0 #endif #endif %include "installmgr.i" #ifndef E#endif #endif %include "installmgr.i" #ifndef EXCLUD#endif #endif %include "installmgr.i" #ifndef EXCL#endif #endif %include "installmgr.i" #ifndef E#endif #endif %include "installmgr.i" #ifndef EX#endif #endif %include "installmgr.i" #ifndef E#endif #endif %include "installmgr.i" #ifndef#endif #endif %include "installmgr.i" #ifnd#endif #endif %include "installmgr.i"#endif #endif %include "installmgr.i#endif #en#endi##endif #endif %inc##endif#endif #endif #endif %include "installmgr.i" #ifndef EXCLUDE_INSTALLMGR %include "remotetrans.i" #ifndef EXCLUDE_FTP %include "swlog.i" %include "extras.i" %include "osishtmlhref.i" %include "utilxml.i" %include "url.i" %include "localemgr.i" %include "ztext.i" %include "rawtext.i" %include "swtext.i" %include "zld.i" %include "rawld4.i" %include "rawld.i" %include "swld.i" %include "rawgenbook.i" %include "swgenbook.i" %include "zcom.i" %include "rawcom.i" %include "swcom.i" %include "zipcomprs.i" %include "lzsscomprs.i" %include "swcomprs.i" %include "swlocale.i" %include "markupfiltmgr.i" %include "encfiltmgr.i" %include "filemgr.h" %include "swmgr.i" %include "swmodule.i" //%include "swcacher.i" %include "swsearchable.i" %include "stringmgr.i" %include "swfiltermgr.i" %include "swoptfilter.i" %include "swfilter.i" %include "swdisp.i" %include "versetreekey.i" %include "treekeyidx.i" %include "treekey.i" %include "versekey.i" %include "listkey.i" %include "swkey.i" %include "bases.i" %include "swversion.i" %include "swconfig.i" %include "swobject.i" %include "templates.i" /* Now include all the STL templates we are going to use */ %include "multimapwdef.i" %include "swbuf.i" %include "defs.i" %ignore sword::SWBuf::append(wchar_t); /* An ignore for missing wchar_t compatibility */ %ignore *::operator sword::SWKey *; %ignore *::operator sword::SWKey &; %ignore *::operator--; %ignore *::operator++; %ignore *::operator=; /* Some generic ignores. These don't map into any Python operators */ %ignore *::operator SWBuf; /* Some renames for sanity */ #endif %include "directors.i" #ifdef SWIGPYTHON %include "deprecations.i" %warnfilter(401); /* Ignore warnings about Unknown base class */ %module(directors="1") Sword; %module "Sword" #define SWDLLEXPORT
\ No newline at end of file
Modified: trunk/bindings/swig/deprecations.i
===================================================================
--- trunk/bindings/swig/deprecations.i 2013-08-06 02:08:53 UTC (rev 2953)
+++ trunk/bindings/swig/deprecations.i 2013-08-11 07:09:29 UTC (rev 2954)
@@ -1,5 +1,18 @@
/* Methods that are deprecated in SWORD and should be ignored. */
+/* These are all together */
+%ignore sword::SWModule::operator const char *;
+%ignore sword::SWVersion::operator const char *;
+%ignore sword::SWKey::operator const char *;
+%ignore sword::ListKey::operator const char *;
+%ignore sword::VerseKey::operator const char *;
+%ignore sword::TreeKey::operator const char *;
+%ignore sword::TreeKeyIdx::operator const char *;
+%ignore sword::VerseTreeKey::operator const char *;
+%ignore sword::XMLTag::operator const char *;
+
+%ignore sword::StatusReporter::statusUpdate;
+
%ignore sword::SWDisplay::Display(SWModule&);
%ignore sword::SWKey::Error();
Modified: trunk/bindings/swig/swbuf.i
===================================================================
--- trunk/bindings/swig/swbuf.i 2013-08-06 02:08:53 UTC (rev 2953)
+++ trunk/bindings/swig/swbuf.i 2013-08-11 07:09:29 UTC (rev 2954)
@@ -2,7 +2,7 @@
#include "swbuf.h"
%}
-%ignore sword::SWBuf::operator const char *;
+%rename(__str__) sword::SWBuf::operator const char *;
%ignore sword::SWBuf::operator[];
%ignore sword::SWBuf::operator+;
%ignore sword::SWBuf::operator==;
@@ -33,11 +33,5 @@
char charAt2(unsigned int pos) {
return self->charAt((unsigned long)pos);
}
- %extend {
- char *__str__() {
- return const_cast<char *>(self->c_str());
- }
- }
-
};
Modified: trunk/bindings/swig/sword.i
===================================================================
--- trunk/bindings/swig/sword.i 2013-08-06 02:08:53 UTC (rev 2953)
+++ trunk/bindings/swig/sword.i 2013-08-11 07:09:29 UTC (rev 2954)
@@ -12,11 +12,13 @@
%include "directors.i"
#endif
+/* Some renames for sanity */
+%ignore *::operator SWBuf;
+
/* Some generic ignores. These don't map into any Python operators */
%ignore *::operator=;
%ignore *::operator++;
%ignore *::operator--;
-%ignore *::operator const char *;
%ignore *::operator sword::SWKey &;
%ignore *::operator sword::SWKey *;
/* An ignore for missing wchar_t compatibility */
More information about the sword-cvs
mailing list