Documentation improvements.

GitOrigin-RevId: 97c207980ea1265ebc5c4421a7bd22d77553f2f5
This commit is contained in:
levlam 2020-01-06 21:44:09 +03:00
parent bd78bbdd5d
commit 3aaa58a8c0
9 changed files with 16 additions and 13 deletions

View File

@ -79,7 +79,7 @@ set(MEMPROF "" CACHE STRING "Use one of \"ON\", \"FAST\" or \"SAFE\" to enable m
Works under macOS and Linux when compiled using glibc. \ Works under macOS and Linux when compiled using glibc. \
In FAST mode stack is unwinded only using frame pointers, which may fail. \ In FAST mode stack is unwinded only using frame pointers, which may fail. \
In SAFE mode stack is unwinded using backtrace function from execinfo.h, which may be very slow. \ In SAFE mode stack is unwinded using backtrace function from execinfo.h, which may be very slow. \
By default both methods are used to achieve maximum speed and accuracy") By default both methods are used to achieve the maximum speed and accuracy")
if (EMSCRIPTEN) if (EMSCRIPTEN)
# use prebuilt zlib # use prebuilt zlib

View File

@ -316,7 +316,10 @@ function split_file($file, $chunks, $undo) {
} }
if (in_array('--help', $argv) || in_array('-h', $argv)) { if (in_array('--help', $argv) || in_array('-h', $argv)) {
echo "Usage: php SplitSource.php [OPTION]...\nSplits some source files to reduce maximum RAM needed for compiling a single file.\n -u, --undo Undo all source code changes.\n -h, --help Show this help.\n"; echo "Usage: php SplitSource.php [OPTION]...\n".
"Splits some source files to reduce a maximum amount of RAM needed for compiling a single file.\n".
" -u, --undo Undo all source code changes.\n".
" -h, --help Show this help.\n";
exit(2); exit(2);
} }

View File

@ -41,10 +41,10 @@ public final class Log {
public static native boolean setFilePath(String filePath); public static native boolean setFilePath(String filePath);
/** /**
* Changes maximum size of TDLib log file. * Changes the maximum size of TDLib log file.
* *
* @deprecated As of TDLib 1.4.0 in favor of {@link TdApi.SetLogStream}, to be removed in the future. * @deprecated As of TDLib 1.4.0 in favor of {@link TdApi.SetLogStream}, to be removed in the future.
* @param maxFileSize Maximum size of the file to where the internal TDLib log is written * @param maxFileSize The maximum size of the file to where the internal TDLib log is written
* before the file will be auto-rotated. Must be positive. Defaults to 10 MB. * before the file will be auto-rotated. Must be positive. Defaults to 10 MB.
*/ */
@Deprecated @Deprecated

View File

@ -97,7 +97,7 @@ class Client final {
/** /**
* Receives incoming updates and request responses from TDLib. May be called from any thread, but shouldn't be * Receives incoming updates and request responses from TDLib. May be called from any thread, but shouldn't be
* called simultaneously from two different threads. * called simultaneously from two different threads.
* \param[in] timeout Maximum number of seconds allowed for this function to wait for new data. * \param[in] timeout The maximum number of seconds allowed for this function to wait for new data.
* \return An incoming update or request response. The object returned in the response may be a nullptr * \return An incoming update or request response. The object returned in the response may be a nullptr
* if the timeout expires. * if the timeout expires.
*/ */

View File

@ -38,11 +38,11 @@ class Log {
static bool set_file_path(std::string file_path); static bool set_file_path(std::string file_path);
/** /**
* Sets maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated. * Sets the maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated.
* Unused if log is not written to a file. Defaults to 10 MB. * Unused if log is not written to a file. Defaults to 10 MB.
* *
* \deprecated Use synchronous td::td_api::setLogStream request instead. * \deprecated Use synchronous td::td_api::setLogStream request instead.
* \param[in] max_file_size Maximum size of the file to where the internal TDLib log is written before the file * \param[in] max_file_size The maximum size of the file to where the internal TDLib log is written before the file
* will be auto-rotated. Should be positive. * will be auto-rotated. Should be positive.
*/ */
static void set_max_file_size(std::int64_t max_file_size); static void set_max_file_size(std::int64_t max_file_size);

View File

@ -46,9 +46,9 @@ public:
} }
/// <summary> /// <summary>
/// Changes maximum size of TDLib log file. /// Changes the maximum size of TDLib log file.
/// </summary> /// </summary>
/// <param name="maxFileSize">Maximum size of the file to where the internal TDLib log is written /// <param name="maxFileSize">The maximum size of the file to where the internal TDLib log is written
/// before the file will be auto-rotated. Must be positive. Defaults to 10 MB.</param> /// before the file will be auto-rotated. Must be positive. Defaults to 10 MB.</param>
[DEPRECATED_ATTRIBUTE("SetMaxFileSize is deprecated, please use Telegram.Td.Api.SetLogStream request instead.")] [DEPRECATED_ATTRIBUTE("SetMaxFileSize is deprecated, please use Telegram.Td.Api.SetLogStream request instead.")]
static void SetMaxFileSize(std::int64_t maxFileSize) { static void SetMaxFileSize(std::int64_t maxFileSize) {

View File

@ -361,7 +361,7 @@ vector<int32> PollManager::get_vote_percentage(const vector<int32> &voter_counts
return result; return result;
} }
// now we need to choose up to (100 - percent_sum) options with minimum total gap, such that // now we need to choose up to (100 - percent_sum) options with a minimum total gap, such that
// any two options with the same voter_count are chosen or not chosen simultaneously // any two options with the same voter_count are chosen or not chosen simultaneously
struct Option { struct Option {
int32 pos = -1; int32 pos = -1;

View File

@ -72,7 +72,7 @@ TDJSON_EXPORT void td_json_client_send(void *client, const char *request);
* Returned pointer will be deallocated by TDLib during next call to td_json_client_receive or td_json_client_execute * Returned pointer will be deallocated by TDLib during next call to td_json_client_receive or td_json_client_execute
* in the same thread, so it can't be used after that. * in the same thread, so it can't be used after that.
* \param[in] client The client. * \param[in] client The client.
* \param[in] timeout Maximum number of seconds allowed for this function to wait for new data. * \param[in] timeout The maximum number of seconds allowed for this function to wait for new data.
* \return JSON-serialized null-terminated incoming update or request response. May be NULL if the timeout expires. * \return JSON-serialized null-terminated incoming update or request response. May be NULL if the timeout expires.
*/ */
TDJSON_EXPORT const char *td_json_client_receive(void *client, double timeout); TDJSON_EXPORT const char *td_json_client_receive(void *client, double timeout);

View File

@ -33,11 +33,11 @@ extern "C" {
TDJSON_DEPRECATED_EXPORT int td_set_log_file_path(const char *file_path); TDJSON_DEPRECATED_EXPORT int td_set_log_file_path(const char *file_path);
/** /**
* Sets maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated. * Sets the maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated.
* Unused if log is not written to a file. Defaults to 10 MB. * Unused if log is not written to a file. Defaults to 10 MB.
* *
* \deprecated Use synchronous setLogStream request instead. * \deprecated Use synchronous setLogStream request instead.
* \param[in] max_file_size Maximum size of the file to where the internal TDLib log is written before the file * \param[in] max_file_size The maximum size of the file to where the internal TDLib log is written before the file
* will be auto-rotated. Should be positive. * will be auto-rotated. Should be positive.
*/ */
TDJSON_DEPRECATED_EXPORT void td_set_log_max_file_size(long long max_file_size); TDJSON_DEPRECATED_EXPORT void td_set_log_max_file_size(long long max_file_size);