<commit_before>/*
    +--------------------------------------------------------------------+
    | PECL :: pq                                                         |
    +--------------------------------------------------------------------+
    | Redistribution and use in source and binary forms, with or without |
    | modification, are permitted provided that the conditions mentioned |
    | in the accompanying LICENSE file are met.                          |
    +--------------------------------------------------------------------+
    | Copyright (c) 2013, <NAME> <<EMAIL>>                |
    +--------------------------------------------------------------------+
*/


#ifndef PHP_PQ_ERROR_H
#define PHP_PQ_ERROR_H

#include <libpq-fe.h>

typedef int STATUS; /* SUCCESS/FAILURE */

#include "php_pqres.h"

/* TSRM morony */
#if PHP_VERSION_ID >= 50700
#	define z_is_true(z) zend_is_true(z TSRMLS_CC)
#else
#	define z_is_true zend_is_true
#endif

/* trim LF from EOL */
char *php_pq_rtrim(char *e);

/* R, W, RW */
const char *php_pq_strmode(long mode);

/* compare array index */
int php_pq_compare_index(const void *lptr, const void *rptr TSRMLS_DC);

#define PHP_PQerrorMessage(c) rtrim(PQerrorMessage((c)))
#define PHP_PQresultErrorMessage(r) rtrim(PQresultErrorMessage((r)))

zend_class_entry *php_pqdt_class_entry;
zval *php_pqdt_from_string(char *datetime_str, size_t datetime_len, char *fmt, zval *zv TSRMLS_DC);
void php_pqdt_to_string(zval *zdt, const char *format, char **str_buf, size_t *str_len TSRMLS_DC);

zend_class_entry *php_pqconv_class_entry;

HashTable *php_pq_parse_array(php_pqres_t *res, const char *val_str, size_t val_len, Oid typ TSRMLS_DC);


PHP_MINIT_FUNCTION(pq_misc);

#endif

/*
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 * vim600: noet sw=4 ts=4 fdm=marker
 * vim<600: noet sw=4 ts=4
 */<commit_msg>fix missing bit<commit_after>/*
    +--------------------------------------------------------------------+
    | PECL :: pq                                                         |
    +--------------------------------------------------------------------+
    | Redistribution and use in source and binary forms, with or without |
    | modification, are permitted provided that the conditions mentioned |
    | in the accompanying LICENSE file are met.                          |
    +--------------------------------------------------------------------+
    | Copyright (c) 2013, <NAME> <<EMAIL>>                |
    +--------------------------------------------------------------------+
*/


#ifndef PHP_PQ_ERROR_H
#define PHP_PQ_ERROR_H

#include <libpq-fe.h>

typedef int STATUS; /* SUCCESS/FAILURE */

#include "php_pqres.h"

/* TSRM morony */
#if PHP_VERSION_ID >= 50700
#	define z_is_true(z) zend_is_true(z TSRMLS_CC)
#else
#	define z_is_true zend_is_true
#endif

/* trim LF from EOL */
char *php_pq_rtrim(char *e);

/* R, W, RW */
const char *php_pq_strmode(long mode);

/* compare array index */
int php_pq_compare_index(const void *lptr, const void *rptr TSRMLS_DC);

#define PHP_PQerrorMessage(c) php_pq_rtrim(PQerrorMessage((c)))
#define PHP_PQresultErrorMessage(r) php_pq_rtrim(PQresultErrorMessage((r)))

zend_class_entry *php_pqdt_class_entry;
zval *php_pqdt_from_string(char *datetime_str, size_t datetime_len, char *fmt, zval *zv TSRMLS_DC);
void php_pqdt_to_string(zval *zdt, const char *format, char **str_buf, size_t *str_len TSRMLS_DC);

zend_class_entry *php_pqconv_class_entry;

HashTable *php_pq_parse_array(php_pqres_t *res, const char *val_str, size_t val_len, Oid typ TSRMLS_DC);


PHP_MINIT_FUNCTION(pq_misc);

#endif

/*
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 * vim600: noet sw=4 ts=4 fdm=marker
 * vim<600: noet sw=4 ts=4
 */
{'fraction_non_alphanumeric': 0.24134256792754397, 'fraction_numerical': 0.011188066062866276, 'mean_word_length': 1.9683794466403162, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6049192', 'n_tokens_mistral': 1295, 'n_tokens_neox': 1204, 'n_words': 292}