diff _mysql.h @ 18:d55bfb1a4701 MySQLdb

Tons of changes from major refactoring/cleanup. This is all really broken right now. In particular, all results are returned as strings.
author adustman
date Fri, 14 Mar 2008 23:06:29 +0000
parents fa8974a41c76
children 0b7f85cb8f4f
line wrap: on
line diff
--- a/_mysql.h	Tue Feb 27 00:58:49 2007 +0000
+++ b/_mysql.h	Fri Mar 14 23:06:29 2008 +0000
@@ -57,6 +57,15 @@
 
 extern PyTypeObject _mysql_ResultObject_Type;
 
+typedef struct {
+	PyObject_HEAD
+	PyObject *result;
+	MYSQL_FIELD field;
+	unsigned int index;
+} _mysql_FieldObject;
+
+extern PyTypeObject _mysql_FieldObject_Type;
+
 int _mysql_server_init_done;
 #if MYSQL_VERSION_ID >= 40000
 #define check_server_init(x) if (!_mysql_server_init_done) { if (mysql_server_init(0, NULL, NULL)) { _mysql_Exception(NULL); return x; } else { _mysql_server_init_done = 1;} }
@@ -64,18 +73,18 @@
 #define check_server_init(x) if (!_mysql_server_init_done) _mysql_server_init_done = 1
 #endif
 
-PyObject *_mysql_MySQLError;
- PyObject *_mysql_Warning;
- PyObject *_mysql_Error;
- PyObject *_mysql_DatabaseError;
- PyObject *_mysql_InterfaceError; 
- PyObject *_mysql_DataError;
- PyObject *_mysql_OperationalError; 
- PyObject *_mysql_IntegrityError; 
- PyObject *_mysql_InternalError; 
- PyObject *_mysql_ProgrammingError;
- PyObject *_mysql_NotSupportedError;
-PyObject *_mysql_error_map;
+extern PyObject *_mysql_MySQLError;
+extern PyObject *_mysql_Warning;
+extern PyObject *_mysql_Error;
+extern PyObject *_mysql_DatabaseError;
+extern PyObject *_mysql_InterfaceError; 
+extern PyObject *_mysql_DataError;
+extern PyObject *_mysql_OperationalError; 
+extern PyObject *_mysql_IntegrityError; 
+extern PyObject *_mysql_InternalError; 
+extern PyObject *_mysql_ProgrammingError;
+extern PyObject *_mysql_NotSupportedError;
+extern PyObject *_mysql_error_map;
 
 extern PyObject *
 _mysql_Exception(_mysql_ConnectionObject *c);
@@ -85,3 +94,9 @@
 	_mysql_ResultObject *self,
 	PyObject *args,
 	PyObject *kwargs);
+
+extern int
+_mysql_FieldObject_Initialize(
+	_mysql_FieldObject *self,
+	PyObject *args,
+	PyObject *kwargs);