NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
Find a file
Alejandro Colomar e525605d05 Added new array APIs that also work with non-arrays.
Similar to how C pointers to variables can always be considered as
pointers to the first element of an array of size 1 (see the
following code for an example of how they are equivalent),
treating non-NXT_CONF_VALUE_ARRAY as if they were
NXT_CONF_VALUE_ARRAYs of size 1 allows for simpler and more
generic code.

	void foo(ptrdiff_t sz, int arr[sz])
	{
		for (ptrdiff_t i = 0; i < sz; i++)
			arr[i] = 0;
	}

	void bar(void)
	{
		int  x;
		int  y[1];

		foo(1, &x);
		foo(1, y);
	}

nxt_conf_array_elements_count_or_1():
	Similar to nxt_conf_array_elements_count().
	Return a size of 1 when input is non-array, instead of
	causing undefined behavior.  That value (1) makes sense
	because it will be used as the limiter of a loop that
	loops over the array and calls
	nxt_conf_get_array_element_or_itself(), which will return
	a correct element for such loops.

nxt_conf_get_array_element_or_itself():
	Similar to nxt_conf_get_array_element().
	Return the input pointer unmodified (i.e., a pointer to
	the unique element of a hypothetical array), instead of
	returning NULL, which wasn't very useful.

nxt_conf_array_qsort():
	Since it's a no-op for non-arrays, this API can be reused.
2022-04-26 12:38:48 +02:00
auto Tests: using modules in Go. 2022-01-10 16:07:31 +03:00
docs Workaround for the warning in nxt_realloc() on GCC 12. 2022-02-22 19:18:18 +08:00
go Tests: using modules in Go. 2022-01-10 16:07:31 +03:00
pkg Updated copyright notice. 2022-02-15 18:21:10 +03:00
src Added new array APIs that also work with non-arrays. 2022-04-26 12:38:48 +02:00
test Tests: added check for zombie processes. 2022-04-12 04:16:00 +01:00
.hgignore Added .hgignore file. 2020-09-18 19:37:56 +01:00
.hgtags Unit 1.26.1 release. 2021-12-02 18:36:28 +03:00
CHANGES Added version 1.26.1 CHANGES. 2021-12-02 18:22:57 +03:00
configure Printing version in "./configure" output. 2021-12-03 03:11:06 +03:00
LICENSE Added LICENSE and NOTICE files. 2017-09-06 18:26:37 +03:00
NOTICE Updated copyright notice. 2022-02-15 18:21:10 +03:00
README README: added project name to the beginning. 2017-09-19 19:05:03 +03:00
version Version bump. 2021-12-02 17:16:05 +03:00

NGINX Unit
----------

The documentation and binary packages are available online:

  http://unit.nginx.org

The source code is provided under the terms of Apache License 2.0:

  http://hg.nginx.org/unit

Please ask questions, report issues, and send patches to the mailing list:

  unit@nginx.org (http://mailman.nginx.org/mailman/listinfo/unit)

or via Github:

  https://github.com/nginx/unit

--
NGINX, Inc.
http://nginx.com