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 typedef int STATUS
; /* SUCCESS/FAILURE */
21 #include "php_pqres.h"
24 #if PHP_VERSION_ID >= 50700
25 # define z_is_true(z) zend_is_true(z TSRMLS_CC)
27 # define z_is_true zend_is_true
30 /* trim LF from EOL */
34 const char *strmode(long mode
);
36 /* compare array index */
37 int compare_index(const void *lptr
, const void *rptr TSRMLS_DC
);
39 #define PHP_PQerrorMessage(c) rtrim(PQerrorMessage((c)))
40 #define PHP_PQresultErrorMessage(r) rtrim(PQresultErrorMessage((r)))
42 zend_class_entry
*php_pqdt_class_entry
;
43 zval
*php_pqdt_from_string(char *datetime_str
, size_t datetime_len
, char *fmt
, zval
*zv TSRMLS_DC
);
44 void php_pqdt_to_string(zval
*zdt
, const char *format
, char **str_buf
, size_t *str_len TSRMLS_DC
);
46 zend_class_entry
*php_pqconv_class_entry
;
48 HashTable
*php_pq_parse_array(php_pqres_t
*res
, const char *val_str
, size_t val_len
, Oid typ TSRMLS_DC
);
51 PHP_MINIT_FUNCTION(pq_misc
);
60 * vim600: noet sw=4 ts=4 fdm=marker
61 * vim<600: noet sw=4 ts=4