Skip to content

Commit

Permalink
export micro_get_sfxsize_limit to php
Browse files Browse the repository at this point in the history
  • Loading branch information
dixyes committed May 31, 2024
1 parent d7577da commit eceb70b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion php_micro.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_micro_get_sfxsize, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_micro_get_sfxsize_limit, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_micro_get_self_filename, 0)
ZEND_END_ARG_INFO()

Expand All @@ -364,7 +367,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_micro_open_self, 0)
ZEND_END_ARG_INFO()

// clang-format off
// clang-format off

#ifdef PHP_WIN32
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_realloc_console, 0, 0, _IS_BOOL, 0)
Expand All @@ -387,6 +390,7 @@ static const zend_function_entry additional_functions[] = {
// micro sapi functions
PHP_FE(micro_get_sfx_filesize, arginfo_micro_get_sfx_filesize)
PHP_FE(micro_get_sfxsize, arginfo_micro_get_sfxsize)
PHP_FE(micro_get_sfxsize_limit, arginfo_micro_get_sfxsize_limit)
PHP_FE(micro_get_self_filename, arginfo_micro_get_self_filename)
PHP_FE(micro_version, arginfo_micro_version)
PHP_FE(micro_open_self, arginfo_micro_open_self)
Expand Down
7 changes: 7 additions & 0 deletions php_micro_fileinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ PHPAPI PHP_FUNCTION(micro_get_sfx_filesize);
*/
PHPAPI PHP_FUNCTION(micro_get_sfxsize);

/*
* zif_micro_get_sfxsize_limit
* micro_get_sfxsize_limit() -> int
* get sfx size in bytes
*/
PHPAPI PHP_FUNCTION(micro_get_sfxsize_limit);

/*
* zif_micro_get_self_filename
* micro_get_self_filename() -> string
Expand Down

0 comments on commit eceb70b

Please sign in to comment.