@@ -180,9 +180,9 @@ public String toString() {
180180 public void __setattr__ (String name , PyObject value ) {
181181
182182 if ("arraysize" .equals (name )) {
183- this .arraysize = (( PyInteger ) value .__int__ ()). getValue ();
183+ this .arraysize = value .asInt ();
184184 } else if ("softspace" .equals (name )) {
185- this .softspace = (( PyInteger ) value .__int__ ()). getValue ();
185+ this .softspace = value .asInt ();
186186 } else if ("datahandler" .equals (name )) {
187187 this .datahandler = (DataHandler )value .__tojava__ (DataHandler .class );
188188 } else {
@@ -398,8 +398,8 @@ private PyStatement prepareStatement(PyObject sql, PyObject maxRows, boolean pre
398398 sqlStatement = this .connection .connection .createStatement ();
399399 }
400400 } else {
401- int t = (( PyInteger ) this .rsType .__int__ ()). getValue ();
402- int c = (( PyInteger ) this .rsConcur .__int__ ()). getValue ();
401+ int t = this .rsType .asInt ();
402+ int c = this .rsConcur .asInt ();
403403
404404 if (prepared ) {
405405 sqlStatement = this .connection .connection .prepareStatement (sqlString , t , c );
@@ -414,7 +414,7 @@ private PyStatement prepareStatement(PyObject sql, PyObject maxRows, boolean pre
414414 }
415415
416416 if (maxRows != Py .None ) {
417- stmt .statement .setMaxRows ((( PyInteger ) maxRows .__int__ ()). getValue ());
417+ stmt .statement .setMaxRows (maxRows .asInt ());
418418 }
419419 } catch (AbstractMethodError e ) {
420420 throw zxJDBC .makeException (zxJDBC .NotSupportedError , zxJDBC .getString ("nodynamiccursors" ));
@@ -457,7 +457,7 @@ public void callproc(PyObject name, final PyObject params, PyObject bindings, Py
457457 Statement stmt = procedure .prepareCall (this .rsType , this .rsConcur );
458458
459459 if (maxRows != Py .None ) {
460- stmt .setMaxRows ((( PyInteger ) maxRows .__int__ ()). getValue ());
460+ stmt .setMaxRows (maxRows .asInt ());
461461 }
462462
463463 // get the bindings per the stored proc spec
@@ -897,7 +897,7 @@ public PyObject __call__(PyObject arg) {
897897 PyCursor cursor = (PyCursor )__self__ ;
898898 switch (index ) {
899899 case 0 :
900- return cursor .fetchmany ((( PyInteger ) arg .__int__ ()). getValue ());
900+ return cursor .fetchmany (arg .asInt ());
901901 case 5 :
902902 cursor .execute (arg , Py .None , Py .None , Py .None );
903903 return Py .None ;
@@ -911,7 +911,7 @@ public PyObject __call__(PyObject arg) {
911911 cursor .executemany (arg , Py .None , Py .None , Py .None );
912912 return Py .None ;
913913 case 10 :
914- cursor .scroll ((( PyInteger ) arg .__int__ ()). getValue (), "relative" );
914+ cursor .scroll (arg .asInt (), "relative" );
915915 return Py .None ;
916916 case 11 :
917917 cursor .execute (arg , Py .None , Py .None , Py .None );
@@ -938,7 +938,7 @@ public PyObject __call__(PyObject arga, PyObject argb) {
938938 cursor .executemany (arga , argb , Py .None , Py .None );
939939 return Py .None ;
940940 case 10 :
941- cursor .scroll ((( PyInteger ) arga .__int__ ()). getValue (), argb .toString ());
941+ cursor .scroll (arga .asInt (), argb .toString ());
942942 return Py .None ;
943943 default :
944944 throw info .unexpectedCall (2 , false );
0 commit comments