<commit_before>/**
 *    Copyright(c) 2016-2017 rryqszq4
 *
 *
 */

#include "php_ngx.h"

#include "../ngx_http_php_module.h"
#include "../ngx_http_php_request.h"

#include "php_ngx_core.h"
#include "php_ngx_location.h"
#include "php_ngx_log.h"
#include "php_ngx_socket_tcp.h"
#include "php_ngx_time.h"

// If you declare any globals in php_php_ngx.h uncomment this:
ZEND_DECLARE_MODULE_GLOBALS(php_ngx)


/* True global resources - no need for thread safety here */
//static int le_php_ngx;

/* {{{ php_ngx_functions[]
 *
 * Every user visible function must have an entry in php_ngx_functions[].
 */
const zend_function_entry php_ngx_functions[] = {
	PHP_FE(confirm_php_ngx_compiled,	NULL)		/* For testing, remove later. */
	PHP_FE_END	/* Must be the last line in php_ngx_functions[] */
};
/* }}} */

/* {{{ php_ngx_module_entry
 */
zend_module_entry php_ngx_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
	STANDARD_MODULE_HEADER,
#endif
	"php_ngx",
	php_ngx_functions,
	PHP_MINIT(php_ngx),
	PHP_MSHUTDOWN(php_ngx),
	PHP_RINIT(php_ngx),		/* Replace with NULL if there's nothing to do at request start */
	PHP_RSHUTDOWN(php_ngx),	/* Replace with NULL if there's nothing to do at request end */
	PHP_MINFO(php_ngx),
#if ZEND_MODULE_API_NO >= 20010901
	"0.1", /* Replace with version number for your extension */
#endif
	STANDARD_MODULE_PROPERTIES
};
/* }}} */

#ifdef COMPILE_DL_PHP_NGX
ZEND_GET_MODULE(php_ngx)
#endif

/* {{{ PHP_INI
 */
/* Remove comments and fill if you need to have entries in php.ini
PHP_INI_BEGIN()
    STD_PHP_INI_ENTRY("php_ngx.global_value",      "42", PHP_INI_ALL, OnUpdateLong, global_value, zend_php_ngx_globals, php_ngx_globals)
    STD_PHP_INI_ENTRY("php_ngx.global_string", "foobar", PHP_INI_ALL, OnUpdateString, global_string, zend_php_ngx_globals, php_ngx_globals)
PHP_INI_END()
*/
/* }}} */

/* {{{ php_php_ngx_init_globals
 */
// Uncomment this function if you have INI entries
static void php_php_ngx_init_globals(zend_php_ngx_globals *php_ngx_globals)
{
	//php_ngx_globals->global_value = 0;
	//php_ngx_globals->global_string = NULL;
}

/* }}} */

/* {{{ PHP_MINIT_FUNCTION
 */
PHP_MINIT_FUNCTION(php_ngx)
{
	/* If you have INI entries, uncomment these lines 
	REGISTER_INI_ENTRIES();
	*/
	ZEND_INIT_MODULE_GLOBALS(php_ngx, php_php_ngx_init_globals,NULL);

	//php_ngx_core_init(module_number TSRMLS_CC);
	//ngx_location_init(module_number TSRMLS_CC);
	//php_ngx_log_init(module_number TSRMLS_CC);
	//ngx_socket_tcp_init(module_number TSRMLS_CC);

	return SUCCESS;
}
/* }}} */

/* {{{ PHP_MSHUTDOWN_FUNCTION
 */
PHP_MSHUTDOWN_FUNCTION(php_ngx)
{
	/* uncomment this line if you have INI entries
	UNREGISTER_INI_ENTRIES();
	*/
	return SUCCESS;
}
/* }}} */

/* Remove if there's nothing to do at request start */
/* {{{ PHP_RINIT_FUNCTION
 */
PHP_RINIT_FUNCTION(php_ngx)
{
	//ngx_location_init(0 TSRMLS_CC);
	PHP_NGX_G(global_r) = NULL;

	return SUCCESS;
}
/* }}} */

/* Remove if there's nothing to do at request end */
/* {{{ PHP_RSHUTDOWN_FUNCTION
 */
PHP_RSHUTDOWN_FUNCTION(php_ngx)
{
	return SUCCESS;
}
/* }}} */

/* {{{ PHP_MINFO_FUNCTION
 */
PHP_MINFO_FUNCTION(php_ngx)
{
	php_info_print_table_start();
	php_info_print_table_header(2, "php_ngx support", "enabled");
	php_info_print_table_end();

	/* Remove comments if you have entries in php.ini
	DISPLAY_INI_ENTRIES();
	*/
}
/* }}} */


/* Remove the following function when you have succesfully modified config.m4<commit_msg>[src]  test constant<commit_after>/**
 *    Copyright(c) 2016-2017 rryqszq4
 *
 *
 */

#include "php_ngx.h"

#include "../ngx_http_php_module.h"
#include "../ngx_http_php_request.h"

#include "php_ngx_core.h"
#include "php_ngx_location.h"
#include "php_ngx_log.h"
#include "php_ngx_socket_tcp.h"
#include "php_ngx_time.h"

// If you declare any globals in php_php_ngx.h uncomment this:
ZEND_DECLARE_MODULE_GLOBALS(php_ngx)


/* True global resources - no need for thread safety here */
//static int le_php_ngx;

/* {{{ php_ngx_functions[]
 *
 * Every user visible function must have an entry in php_ngx_functions[].
 */
const zend_function_entry php_ngx_functions[] = {
	PHP_FE(confirm_php_ngx_compiled,	NULL)		/* For testing, remove later. */
	PHP_FE_END	/* Must be the last line in php_ngx_functions[] */
};
/* }}} */

/* {{{ php_ngx_module_entry
 */
zend_module_entry php_ngx_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
	STANDARD_MODULE_HEADER,
#endif
	"php_ngx",
	php_ngx_functions,
	PHP_MINIT(php_ngx),
	PHP_MSHUTDOWN(php_ngx),
	PHP_RINIT(php_ngx),		/* Replace with NULL if there's nothing to do at request start */
	PHP_RSHUTDOWN(php_ngx),	/* Replace with NULL if there's nothing to do at request end */
	PHP_MINFO(php_ngx),
#if ZEND_MODULE_API_NO >= 20010901
	"0.1", /* Replace with version number for your extension */
#endif
	STANDARD_MODULE_PROPERTIES
};
/* }}} */

#ifdef COMPILE_DL_PHP_NGX
ZEND_GET_MODULE(php_ngx)
#endif

/* {{{ PHP_INI
 */
/* Remove comments and fill if you need to have entries in php.ini
PHP_INI_BEGIN()
    STD_PHP_INI_ENTRY("php_ngx.global_value",      "42", PHP_INI_ALL, OnUpdateLong, global_value, zend_php_ngx_globals, php_ngx_globals)
    STD_PHP_INI_ENTRY("php_ngx.global_string", "foobar", PHP_INI_ALL, OnUpdateString, global_string, zend_php_ngx_globals, php_ngx_globals)
PHP_INI_END()
*/
/* }}} */

/* {{{ php_php_ngx_init_globals
 */
// Uncomment this function if you have INI entries
static void php_php_ngx_init_globals(zend_php_ngx_globals *php_ngx_globals)
{
	//php_ngx_globals->global_value = 0;
	//php_ngx_globals->global_string = NULL;
}

/* }}} */

/* {{{ PHP_MINIT_FUNCTION
 */
PHP_MINIT_FUNCTION(php_ngx)
{
	/* If you have INI entries, uncomment these lines 
	REGISTER_INI_ENTRIES();
	*/
	ZEND_INIT_MODULE_GLOBALS(php_ngx, php_php_ngx_init_globals,NULL);

	//php_ngx_core_init(module_number TSRMLS_CC);
	//ngx_location_init(module_number TSRMLS_CC);
	//php_ngx_log_init(module_number TSRMLS_CC);
	//ngx_socket_tcp_init(module_number TSRMLS_CC);

	return SUCCESS;
}
/* }}} */

/* {{{ PHP_MSHUTDOWN_FUNCTION
 */
PHP_MSHUTDOWN_FUNCTION(php_ngx)
{
	/* uncomment this line if you have INI entries
	UNREGISTER_INI_ENTRIES();
	*/
	return SUCCESS;
}
/* }}} */

/* Remove if there's nothing to do at request start */
/* {{{ PHP_RINIT_FUNCTION
 */
PHP_RINIT_FUNCTION(php_ngx)
{
	//ngx_location_init(0 TSRMLS_CC);
	PHP_NGX_G(global_r) = NULL;

	REGISTER_LONG_CONSTANT("NGX_OK", NGX_OK, CONST_CS);

	return SUCCESS;
}
/* }}} */

/* Remove if there's nothing to do at request end */
/* {{{ PHP_RSHUTDOWN_FUNCTION
 */
PHP_RSHUTDOWN_FUNCTION(php_ngx)
{
	return SUCCESS;
}
/* }}} */

/* {{{ PHP_MINFO_FUNCTION
 */
PHP_MINFO_FUNCTION(php_ngx)
{
	php_info_print_table_start();
	php_info_print_table_header(2, "php_ngx support", "enabled");
	php_info_print_table_end();

	/* Remove comments if you have entries in php.ini
	DISPLAY_INI_ENTRIES();
	*/
}
/* }}} */


/* Remove the following function when you have succesfully modified config.m4
{'fraction_non_alphanumeric': 0.12784132039959462, 'fraction_numerical': 0.009555523382076155, 'mean_word_length': 4.939810834049871, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1501030', 'n_tokens_mistral': 2899, 'n_tokens_neox': 2783, 'n_words': 530}