2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2013, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
14 #ifndef PHP_PQ_ERROR_H
15 #define PHP_PQ_ERROR_H
19 #if PHP_VERSION_ID < 50500
28 #include "php_pqres.h"
31 #if PHP_VERSION_ID >= 50700
32 # define z_is_true(z) zend_is_true(z TSRMLS_CC)
34 # define z_is_true zend_is_true
37 /* trim LF from EOL */
38 extern char *php_pq_rtrim(char *e
);
41 extern const char *php_pq_strmode(long mode
);
43 /* compare array index */
44 extern int php_pq_compare_index(const void *lptr
, const void *rptr TSRMLS_DC
);
46 #define PHP_PQerrorMessage(c) php_pq_rtrim(PQerrorMessage((c)))
47 #define PHP_PQresultErrorMessage(r) php_pq_rtrim(PQresultErrorMessage((r)))
49 extern zend_class_entry
*php_pqdt_class_entry
;
50 extern zval
*php_pqdt_from_string(zval
*zv
, char *input_fmt
, char *dt_str
, size_t dt_len
, char *output_fmt
, zval
*ztimezone TSRMLS_DC
);
51 extern void php_pqdt_to_string(zval
*zdt
, const char *format
, char **str_buf
, size_t *str_len TSRMLS_DC
);
53 extern zend_class_entry
*php_pqconv_class_entry
;
55 extern HashTable
*php_pq_parse_array(php_pqres_t
*res
, const char *val_str
, size_t val_len
, Oid typ TSRMLS_DC
);
58 extern PHP_MINIT_FUNCTION(pq_misc
);
67 * vim600: noet sw=4 ts=4 fdm=marker
68 * vim<600: noet sw=4 ts=4