[sword-cvs] sword/bindings/swig/perl Sword.cxx,1.6,1.7 Sword.pm,1.5,1.6
sword@www.crosswire.org
sword@www.crosswire.org
Mon, 13 Jan 2003 16:52:12 -0700
Update of /usr/local/cvsroot/sword/bindings/swig/perl
In directory www:/tmp/cvs-serv14865/perl
Modified Files:
Sword.cxx Sword.pm
Log Message:
updated perl binding code
Index: Sword.cxx
===================================================================
RCS file: /usr/local/cvsroot/sword/bindings/swig/perl/Sword.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Sword.cxx 7 Jan 2003 21:19:31 -0000 1.6
--- Sword.cxx 13 Jan 2003 23:52:09 -0000 1.7
***************
*** 6251,6254 ****
--- 6251,6402 ----
+ XS(_wrap_delete_TreeKeyIdx) {
+ char _swigmsg[SWIG_MAX_ERRMSG] = "";
+ const char *_swigerr = _swigmsg;
+ {
+ TreeKeyIdx *arg1 = (TreeKeyIdx *) 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: delete_TreeKeyIdx(self);");
+ }
+ {
+ if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_TreeKeyIdx,0) < 0) {
+ SWIG_croak("Type error in argument 1 of delete_TreeKeyIdx. Expected _p_TreeKeyIdx");
+ }
+ }
+ delete arg1;
+
+
+ XSRETURN(argvi);
+ fail:
+ (void) _swigerr;
+ }
+ croak(_swigerr);
+ }
+
+
+ XS(_wrap_TreeKeyIdx_save) {
+ char _swigmsg[SWIG_MAX_ERRMSG] = "";
+ const char *_swigerr = _swigmsg;
+ {
+ TreeKeyIdx *arg1 = (TreeKeyIdx *) 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: TreeKeyIdx_save(self);");
+ }
+ {
+ if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_TreeKeyIdx,0) < 0) {
+ SWIG_croak("Type error in argument 1 of TreeKeyIdx_save. Expected _p_TreeKeyIdx");
+ }
+ }
+ (arg1)->save();
+
+
+ XSRETURN(argvi);
+ fail:
+ (void) _swigerr;
+ }
+ croak(_swigerr);
+ }
+
+
+ XS(_wrap_TreeKeyIdx_copyFrom) {
+ char _swigmsg[SWIG_MAX_ERRMSG] = "";
+ const char *_swigerr = _swigmsg;
+ {
+ TreeKeyIdx *arg1 = (TreeKeyIdx *) 0 ;
+ TreeKeyIdx *arg2 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: TreeKeyIdx_copyFrom(self,ikey);");
+ }
+ {
+ if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_TreeKeyIdx,0) < 0) {
+ SWIG_croak("Type error in argument 1 of TreeKeyIdx_copyFrom. Expected _p_TreeKeyIdx");
+ }
+ }
+ {
+ if (SWIG_ConvertPtr(ST(1), (void **) &arg2, SWIGTYPE_p_TreeKeyIdx,0) < 0) {
+ SWIG_croak("Type error in argument 2 of TreeKeyIdx_copyFrom. Expected _p_TreeKeyIdx");
+ }
+ }
+ (arg1)->copyFrom((TreeKeyIdx const &)*arg2);
+
+
+ XSRETURN(argvi);
+ fail:
+ (void) _swigerr;
+ }
+ croak(_swigerr);
+ }
+
+
+ XS(_wrap_TreeKeyIdx__compare) {
+ char _swigmsg[SWIG_MAX_ERRMSG] = "";
+ const char *_swigerr = _swigmsg;
+ {
+ TreeKeyIdx *arg1 = (TreeKeyIdx *) 0 ;
+ TreeKeyIdx *arg2 = 0 ;
+ int result;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: TreeKeyIdx__compare(self,ikey);");
+ }
+ {
+ if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_TreeKeyIdx,0) < 0) {
+ SWIG_croak("Type error in argument 1 of TreeKeyIdx__compare. Expected _p_TreeKeyIdx");
+ }
+ }
+ {
+ if (SWIG_ConvertPtr(ST(1), (void **) &arg2, SWIGTYPE_p_TreeKeyIdx,0) < 0) {
+ SWIG_croak("Type error in argument 2 of TreeKeyIdx__compare. Expected _p_TreeKeyIdx");
+ }
+ }
+ result = (int)(arg1)->_compare((TreeKeyIdx const &)*arg2);
+
+ ST(argvi) = sv_newmortal();
+ sv_setiv(ST(argvi++), (IV) result);
+ XSRETURN(argvi);
+ fail:
+ (void) _swigerr;
+ }
+ croak(_swigerr);
+ }
+
+
+ XS(_wrap_TreeKeyIdx_create) {
+ char _swigmsg[SWIG_MAX_ERRMSG] = "";
+ const char *_swigerr = _swigmsg;
+ {
+ char *arg1 ;
+ signed char result;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: TreeKeyIdx_create(path);");
+ }
+ if (!SvOK((SV*) ST(0))) arg1 = 0;
+ else arg1 = (char *) SvPV(ST(0), PL_na);
+ result = (signed char)TreeKeyIdx::create((char const *)arg1);
+
+ ST(argvi) = sv_newmortal();
+ sv_setiv(ST(argvi++), (IV) result);
+ XSRETURN(argvi);
+ fail:
+ (void) _swigerr;
+ }
+ croak(_swigerr);
+ }
+
+
XS(_wrap_new_LocaleMgr) {
char _swigmsg[SWIG_MAX_ERRMSG] = "";
***************
*** 8605,8608 ****
--- 8753,8761 ----
{"Swordc::TreeKey_Traversable", _wrap_TreeKey_Traversable},
{"Swordc::TreeKey_Index", _wrap_TreeKey_Index},
+ {"Swordc::delete_TreeKeyIdx", _wrap_delete_TreeKeyIdx},
+ {"Swordc::TreeKeyIdx_save", _wrap_TreeKeyIdx_save},
+ {"Swordc::TreeKeyIdx_copyFrom", _wrap_TreeKeyIdx_copyFrom},
+ {"Swordc::TreeKeyIdx__compare", _wrap_TreeKeyIdx__compare},
+ {"Swordc::TreeKeyIdx_create", _wrap_TreeKeyIdx_create},
{"Swordc::new_LocaleMgr", _wrap_new_LocaleMgr},
{"Swordc::delete_LocaleMgr", _wrap_delete_LocaleMgr},
Index: Sword.pm
===================================================================
RCS file: /usr/local/cvsroot/sword/bindings/swig/perl/Sword.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Sword.pm 7 Jan 2003 21:19:31 -0000 1.5
--- Sword.pm 13 Jan 2003 23:52:09 -0000 1.6
***************
*** 656,659 ****
--- 656,675 ----
@ISA = qw( Sword Sword::TreeKey );
%OWNER = ();
+ %ITERATORS = ();
+ sub DESTROY {
+ return unless $_[0]->isa('HASH');
+ my $self = tied(%{$_[0]});
+ return unless defined $self;
+ delete $ITERATORS{$self};
+ if (exists $OWNER{$self}) {
+ Swordc::delete_TreeKeyIdx($self);
+ delete $OWNER{$self};
+ }
+ }
+
+ *save = *Swordc::TreeKeyIdx_save;
+ *copyFrom = *Swordc::TreeKeyIdx_copyFrom;
+ *_compare = *Swordc::TreeKeyIdx__compare;
+ *create = *Swordc::TreeKeyIdx_create;
sub DISOWN {
my $self = shift;