Package org.python.core

Examples of org.python.core.PyObject.asInt()


            if (bindings != Py.None) {
                PyObject binding = bindings.__finditem__(Py.newInteger(index));

                if (binding != null) {
                    try {
                        int bindingValue = binding.asInt();
                        datahandler.setJDBCObject(preparedStatement, column, param, bindingValue);
                    } catch (PyException e) {
                        throw zxJDBC.makeException(zxJDBC.ProgrammingError,
                                                   zxJDBC.getString("bindingValue"));
                    }
View Full Code Here


                // capturing regions of chars removed by the None mapping to optionally
                // pass to an error handler. Though we don't seem to even use this
                // functionality anywhere either
                ;
            } else if (result instanceof PyInteger) {
                int value = result.asInt();
                if (value < 0 || value > PySystemState.maxunicode) {
                    throw Py.TypeError(String.format("character mapping must be in range(0x%x)",
                                                     PySystemState.maxunicode + 1));
                }
                buf.appendCodePoint(value);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.