@@ -257,7 +257,7 @@ psyco_connect(PyObject *self, PyObject *args, PyObject *keywds)
257257" * `conn_or_curs`: A connection, cursor or None"
258258
259259#define typecast_from_python_doc \
260- "new_type(oids, name, adapter ) -> new type object\n\n" \
260+ "new_type(oids, name, castobj ) -> new type object\n\n" \
261261"Create a new binding object. The object can be used with the\n" \
262262"`register_type()` function to bind PostgreSQL objects to python objects.\n\n" \
263263":Parameters:\n" \
@@ -268,6 +268,15 @@ psyco_connect(PyObject *self, PyObject *args, PyObject *keywds)
268268" the string representation returned by PostgreSQL (`!None` if ``NULL``)\n" \
269269" and ``cur`` is the cursor from which data are read."
270270
271+ #define typecast_array_from_python_doc \
272+ "new_array_type(oids, name, baseobj) -> new type object\n\n" \
273+ "Create a new binding object to parse an array.\n\n" \
274+ "The object can be used with `register_type()`.\n\n" \
275+ ":Parameters:\n" \
276+ " * `oids`: Tuple of ``oid`` of the PostgreSQL types to convert.\n" \
277+ " * `name`: Name for the new type\n" \
278+ " * `baseobj`: Adapter to perform type conversion of a single array item."
279+
271280static void
272281_psyco_register_type_set (PyObject * * dict , PyObject * type )
273282{
@@ -758,6 +767,8 @@ static PyMethodDef psycopgMethods[] = {
758767 METH_VARARGS , psyco_register_type_doc },
759768 {"new_type" , (PyCFunction )typecast_from_python ,
760769 METH_VARARGS |METH_KEYWORDS , typecast_from_python_doc },
770+ {"new_array_type" , (PyCFunction )typecast_array_from_python ,
771+ METH_VARARGS |METH_KEYWORDS , typecast_array_from_python_doc },
761772
762773 {"AsIs" , (PyCFunction )psyco_AsIs ,
763774 METH_VARARGS , psyco_AsIs_doc },
0 commit comments