Doxygen code comment cleanups and new blog post. No code changes. (0.41.5)
This commit is contained in:
parent
4e69a3ce63
commit
4309ec2a52
212 changed files with 423 additions and 476 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* This file is part of the Fun programming language.
|
||||
* https://fun-lang.xyz/
|
||||
*
|
||||
|
|
@ -19,6 +19,11 @@
|
|||
* - Pops: path:string, url:string (values are converted via value_to_string_alloc)
|
||||
* - Pushes: int (1 on success, 0 on error or when CURL is disabled)
|
||||
*
|
||||
* Pops a destination path and URL, streams the HTTP response body
|
||||
* into the file, and pushes 1 on success or 0 on any error. Without
|
||||
* FUN_WITH_CURL, behaves as a no-op that consumes two values and
|
||||
* pushes 0.
|
||||
*
|
||||
* Error handling:
|
||||
* - Returns 0 if URL/path conversion fails, file open fails, CURL init
|
||||
* or perform fails.
|
||||
|
|
@ -29,14 +34,7 @@
|
|||
* - All temporary allocations (URL, path) are freed; FILE* is closed.
|
||||
* - On builds without FUN_WITH_CURL, consumes two values and pushes 0.
|
||||
*/
|
||||
/**
|
||||
* @brief Opcode handler for OP_CURL_DOWNLOAD.
|
||||
*
|
||||
* Pops a destination path and URL, streams the HTTP response body
|
||||
* into the file, and pushes 1 on success or 0 on any error. Without
|
||||
* FUN_WITH_CURL, behaves as a no-op that consumes two values and
|
||||
* pushes 0.
|
||||
*/
|
||||
|
||||
case OP_CURL_DOWNLOAD: {
|
||||
#ifdef FUN_WITH_CURL
|
||||
Value vpath = pop_value(vm);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* This file is part of the Fun programming language.
|
||||
* https://fun-lang.xyz/
|
||||
*
|
||||
|
|
@ -21,6 +21,11 @@
|
|||
* - Pops: url:string (any value is converted via value_to_string_alloc)
|
||||
* - Pushes: body:string ("" on error or when CURL is disabled)
|
||||
*
|
||||
* Converts the top stack value to a URL string, issues a GET request
|
||||
* using libcurl, and pushes the response body as a string. When
|
||||
* compiled without FUN_WITH_CURL, the opcode becomes a no-op that
|
||||
* consumes one value and pushes an empty string.
|
||||
*
|
||||
* Error handling:
|
||||
* - If URL conversion fails or CURL initialization/performance fails,
|
||||
* the opcode pushes an empty string.
|
||||
|
|
@ -30,14 +35,7 @@
|
|||
* - Uses FunCurlBuf and fun_curl_write_cb from the curl extension helpers.
|
||||
* - Memory allocated for temporary strings and buffers is freed before exit.
|
||||
*/
|
||||
/**
|
||||
* @brief Opcode handler for OP_CURL_GET.
|
||||
*
|
||||
* Converts the top stack value to a URL string, issues a GET request
|
||||
* using libcurl, and pushes the response body as a string. When
|
||||
* compiled without FUN_WITH_CURL, the opcode becomes a no-op that
|
||||
* consumes one value and pushes an empty string.
|
||||
*/
|
||||
|
||||
case OP_CURL_GET: {
|
||||
#ifdef FUN_WITH_CURL
|
||||
Value vurl = pop_value(vm);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* This file is part of the Fun programming language.
|
||||
* https://fun-lang.xyz/
|
||||
*
|
||||
|
|
@ -21,6 +21,10 @@
|
|||
* - Pops: body:string, url:string (values are converted via value_to_string_alloc)
|
||||
* - Pushes: body:string (server response; "" on error or when CURL is disabled)
|
||||
*
|
||||
* Pops the POST body and URL, performs an HTTP POST, and pushes the
|
||||
* response as a string. Without FUN_WITH_CURL, consumes two values and
|
||||
* pushes an empty string.
|
||||
*
|
||||
* Error handling:
|
||||
* - If URL conversion fails, the opcode pushes an empty string and discards
|
||||
* any converted body.
|
||||
|
|
@ -31,13 +35,7 @@
|
|||
* - Uses FunCurlBuf and fun_curl_write_cb from the curl extension helpers.
|
||||
* - All temporary allocations (URL, body, response buffer) are freed.
|
||||
*/
|
||||
/**
|
||||
* @brief Opcode handler for OP_CURL_POST.
|
||||
*
|
||||
* Pops the POST body and URL, performs an HTTP POST, and pushes the
|
||||
* response as a string. Without FUN_WITH_CURL, consumes two values and
|
||||
* pushes an empty string.
|
||||
*/
|
||||
|
||||
case OP_CURL_POST: {
|
||||
#ifdef FUN_WITH_CURL
|
||||
Value vbody = pop_value(vm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue