pike.git / src / modules / Mysql / precompiled_mysql.h

version» Context lines:

pike.git/src/modules/Mysql/precompiled_mysql.h:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information.   */      /*    * SQL database connectivity for Pike    * -  * Henrik Grubbström 1996-12-21 +     */      #ifndef PRECOMPILED_MYSQL_H   #define PRECOMPILED_MYSQL_H      /*    * Includes    */      #ifdef HAVE_CONFIG_H
pike.git/src/modules/Mysql/precompiled_mysql.h:37:   #include <mysql/mysql.h>   #else   #error Need mysql.h header-file   #endif /* HAVE_MYSQL_MYSQL_H */   #endif /* HAVE_MYSQL_H */   #ifndef _mysql_h   #define _mysql_h   #endif   #endif    - /* From the Pike-dist */ -  +    /* -  * Structures +  * Macros    */    - struct precompiled_mysql { - #ifdef PIKE_THREADS -  DEFINE_MUTEX(lock); - #endif /* PIKE_THREADS */ + #define PIKE_MYSQL_FLAG_STORE_RESULT 1 + #define PIKE_MYSQL_FLAG_TYPED_RESULT 2    -  MYSQL *mysql; -  struct pike_string *host, *database, *user, *password; /* Reconnect */ -  struct mapping *options; -  struct pike_string *conn_charset; - }; -  - struct precompiled_mysql_result { -  struct object *connection; -  MYSQL_RES *result; -  int eof; -  int typed_mode; - }; -  +    /* -  * Defines -  */ -  - #define PIKE_MYSQL ((struct precompiled_mysql *)(Pike_fp->current_storage)) - #define PIKE_MYSQL_RES ((struct precompiled_mysql_result *)(Pike_fp->current_storage)) -  - /* -  * Globals -  */ -  - extern struct program *mysql_program; - extern struct program *mysql_result_program; -  - /* +     * Prototypes    */      /* From result.c */    -  + struct object *make_mysql_result(MYSQL_RES *result, int flags);   void init_mysql_res_efuns(void);   void init_mysql_res_programs(void);   void exit_mysql_res(void);   void mysqlmod_parse_field(MYSQL_FIELD *field, int support_default);      #endif /* PRECOMPILED_MYSQL_H */