Download src/php/php-src/ext/lexbor/php_lexbor.c from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 2.53 kB
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/lexbor/php_lexbor.c
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/lexbor/php_lexbor.c
-
curl -L -o php_lexbor.c https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/lexbor/php_lexbor.c
2.53 kB
| /* | |
| +----------------------------------------------------------------------+ | |
| | Copyright (c) The PHP Group | | |
| +----------------------------------------------------------------------+ | |
| | This source file is subject to version 3.01 of the PHP license, | | |
| | that is bundled with this package in the file LICENSE, and is | | |
| | available through the world-wide-web at the following url: | | |
| | https://www.php.net/license/3_01.txt | | |
| | If you did not receive a copy of the PHP license and are unable to | | |
| | obtain it through the world-wide-web, please send a note to | | |
| | license@php.net so we can mail you a copy immediately. | | |
| +----------------------------------------------------------------------+ | |
| | Authors: Niels Dossche <nielsdos@php.net> | | |
| | Mate Kocsis <kocsismate@php.net> | | |
| +----------------------------------------------------------------------+ | |
| */ | |
| static void *php_lexbor_malloc(size_t size) | |
| { | |
| return emalloc(size); | |
| } | |
| static void *php_lexbor_realloc(void *dst, size_t size) | |
| { | |
| return erealloc(dst, size); | |
| } | |
| static void *php_lexbor_calloc(size_t num, size_t size) | |
| { | |
| return ecalloc(num, size); | |
| } | |
| static void php_lexbor_free(void *ptr) | |
| { | |
| efree(ptr); | |
| } | |
| static PHP_MINFO_FUNCTION(lexbor) | |
| { | |
| php_info_print_table_start(); | |
| php_info_print_table_row(2, "Lexbor support", "active"); | |
| php_info_print_table_row(2, "Lexbor version", LEXBOR_VERSION); | |
| php_info_print_table_end(); | |
| } | |
| static PHP_MINIT_FUNCTION(lexbor) | |
| { | |
| lexbor_memory_setup(php_lexbor_malloc, php_lexbor_realloc, php_lexbor_calloc, php_lexbor_free); | |
| return SUCCESS; | |
| } | |
| zend_module_entry lexbor_module_entry = { | |
| STANDARD_MODULE_HEADER, | |
| "lexbor", /* extension name */ | |
| NULL, /* extension function list */ | |
| PHP_MINIT(lexbor), /* extension-wide startup function */ | |
| NULL, /* extension-wide shutdown function */ | |
| NULL, /* per-request startup function */ | |
| NULL, /* per-request shutdown function */ | |
| PHP_MINFO(lexbor), /* information function */ | |
| NULL, | |
| STANDARD_MODULE_PROPERTIES | |
| }; | |