Add deallocate() and prepare() to Statement
[m6w6/ext-pq] / src / php_pqstm.h
index 07428593cb3f9b21dd13f93419758ea8d23fcfbf..f5c59a6dbe0bde6dc74f2659911f6ad10e4c51b8 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2013, Michael Wallner <mike@php.net>                |
+    | Copyright (c) 2013, Michael Wallner <mike@php.net>                 |
     +--------------------------------------------------------------------+
 */
 
@@ -20,6 +20,9 @@ typedef struct php_pqstm {
        php_pqconn_object_t *conn;
        char *name;
        HashTable bound;
+       php_pq_params_t *params;
+       char *query;
+       unsigned allocated:1;
 } php_pqstm_t;
 
 typedef struct php_pqstm_object {
@@ -29,10 +32,12 @@ typedef struct php_pqstm_object {
        php_pqstm_t *intern;
 } php_pqstm_object_t;
 
-zend_class_entry *php_pqstm_class_entry;
-zend_object_value php_pqstm_create_object_ex(zend_class_entry *ce, php_pqstm_t *intern, php_pqstm_object_t **ptr TSRMLS_DC);
+extern zend_class_entry *php_pqstm_class_entry;
+extern zend_object_value php_pqstm_create_object_ex(zend_class_entry *ce, php_pqstm_t *intern, php_pqstm_object_t **ptr TSRMLS_DC);
+extern php_pqstm_t *php_pqstm_init(php_pqconn_object_t *conn, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC);
 
-PHP_MINIT_FUNCTION(pqstm);
+extern PHP_MINIT_FUNCTION(pqstm);
+extern PHP_MSHUTDOWN_FUNCTION(pqstm);
 
 #endif