From 4b928e86540866bdc677a65ab6645ced2b7d03c6 Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Sun, 30 Oct 2022 15:10:28 +0000 Subject: [PATCH] TG 1.2.0 + Make patching less dumb (#6) * New patching logic - Based on tags * Readme tweak * 1.2.0 * 515 Compat --- .gitignore | 3 +- README.MD | 6 +- apply_patches.sh | 15 +- .../0001-Paradise-Version-Changes.patch | 34 +-- .../0002-Paradise-Logging-Changes.patch | 13 +- .../0003-Paradise-API-Headers.patch | 206 ++++++++++++------ .../0004-Paradise-DLL-Location-Fix.patch | 20 +- .../0005-Paradise-HTTP-Module-Tweaks.patch | 26 ++- tg-rust-g | 1 - 9 files changed, 212 insertions(+), 112 deletions(-) delete mode 160000 tg-rust-g diff --git a/.gitignore b/.gitignore index 76b89d9..7fe4796 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -paradise-rust-g \ No newline at end of file +paradise-rust-g +tg-rust-g \ No newline at end of file diff --git a/README.MD b/README.MD index 4441b37..3e986ea 100644 --- a/README.MD +++ b/README.MD @@ -2,11 +2,11 @@ This repository holds ParadiseSS13 modifications of [rust-g](https://github.com/tgstation/rust-g) libraries from /tg/station. -This works by keeping an up-to-date copy of /tg/station's code, and a folder of Paradise patches to be applied. This reduces our need for major reworks to code, as we can just use patches to achieve what we need without cluttering the main tree. +This works by keeping a folder of Paradise patches to be applied, and applies it to a specific version tag of tg's rust-g. This reduces our need for major reworks to code, as we can just use patches to achieve what we need without cluttering the main tree. ## License -The license for RUST-G itself can be found inside the `tg-rust-g` directory. Code for the Paradise modifications falls under the same license. +The license for RUST-G itself can be found on tg's repo. Code for the Paradise modifications falls under the same license. ## How to (Compiling) @@ -16,7 +16,7 @@ The license for RUST-G itself can be found inside the `tg-rust-g` directory. Cod - To build on windows, run `cargo build --release --all-features --target=i686-pc-windows-msvc`. This will generate a 32-bit `.dll` file that is compatible with BYOND. - To build on linux, run `cargo build --release --all-features --target=i686-unknown-linux-gnu`. This will generate a 32-bit `.so` file that is compatible with BYOND. -If you are still stuck, check `tg-rust-g/README.md` for more detailed instructions. +If you are still stuck, check tg's README. for more detailed instructions. ## How to (Developing) diff --git a/apply_patches.sh b/apply_patches.sh index 7a28595..8570802 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -1,8 +1,19 @@ #!/bin/sh -PS1="$" basedir=`pwd` -echo "Rebuilding projects.... " +tg_tag="1.2.0" + +echo "Checking for TG rust-g repo.." +if [ ! -d "./tg-rust-g" ] +then + echo "TG rust-g does not exist locally. Cloning..." + git clone https://github.com/tgstation/rust-g.git tg-rust-g +fi + +echo "Setting up project... " + +cd "$basedir/tg-rust-g" +git reset --hard $tg_tag apply_patch() { what=$1 diff --git a/paradise-rust-g-patches/0001-Paradise-Version-Changes.patch b/paradise-rust-g-patches/0001-Paradise-Version-Changes.patch index c75502c..adfffb2 100644 --- a/paradise-rust-g-patches/0001-Paradise-Version-Changes.patch +++ b/paradise-rust-g-patches/0001-Paradise-Version-Changes.patch @@ -1,41 +1,45 @@ -From ab1d942ac45e1b14ffaa13c79e2a44e5c2d2f54c Mon Sep 17 00:00:00 2001 +From 124eccba73fa986f9d9ceffa7a8a69bd97eae218 Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Wed, 13 Oct 2021 22:04:30 +0100 Subject: [PATCH] Paradise Version Changes diff --git a/Cargo.lock b/Cargo.lock -index cd4001f..85313cc 100644 +index ab158a2..f77d99f 100644 --- a/Cargo.lock +++ b/Cargo.lock -@@ -1544,7 +1544,7 @@ dependencies = [ +@@ -1999,7 +1999,7 @@ dependencies = [ [[package]] name = "rust-g" --version = "0.6.0" -+version = "0.6.0-P" +-version = "1.2.0" ++version = "1.2.0-P" dependencies = [ "aho-corasick", - "base64 0.13.0", + "base64", diff --git a/Cargo.toml b/Cargo.toml -index 1cbe8f5..68a7029 100644 +index 121c252..b2166a7 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -1,11 +1,11 @@ +@@ -1,15 +1,15 @@ [package] name = "rust-g" - edition = "2018" --version = "0.6.0" -+version = "0.6.0-P" - authors = ["Bjorn Neergaard "] + edition = "2021" +-version = "1.2.0" ++version = "1.2.0-P" + authors = [ + "Bjorn Neergaard ", + "Tad Hardesty ", + "rust-g maintainer team", + ] -repository = "https://github.com/tgstation/rust-g" +repository = "https://github.com/ParadiseSS13/rust-g" - license-file = "LICENSE" + license = "MIT" -description = "Offloaded task library for the /tg/ Space Station 13 codebase" -+description = "Offloaded task library for the ParadiseSS13 Space Station 13 codebase" ++description = "Offloaded task library for the ParadiseSS13 Space Station 13 codebase - Adapted from tgstation/rust-g" [lib] crate-type = ["cdylib"] -- -2.33.0.windows.2 +2.35.2.windows.1 diff --git a/paradise-rust-g-patches/0002-Paradise-Logging-Changes.patch b/paradise-rust-g-patches/0002-Paradise-Logging-Changes.patch index f14a76d..0da6d94 100644 --- a/paradise-rust-g-patches/0002-Paradise-Logging-Changes.patch +++ b/paradise-rust-g-patches/0002-Paradise-Logging-Changes.patch @@ -1,17 +1,18 @@ -From 4a5eab77486dd2bccac8eb7e345cb9490db124e8 Mon Sep 17 00:00:00 2001 +From a7d7ad5361239e00852692abc39c8404383290e4 Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Wed, 13 Oct 2021 22:04:37 +0100 Subject: [PATCH] Paradise Logging Changes diff --git a/dmsrc/log.dm b/dmsrc/log.dm -index d0380a5..f3be525 100644 +index 1faadc8..bbc8fe6 100644 --- a/dmsrc/log.dm +++ b/dmsrc/log.dm @@ -1,2 +1,2 @@ --#define rustg_log_write(fname, text, format) call(RUST_G, "log_write")(fname, text, format) -+#define rustg_log_write(fname, text) call(RUST_G, "log_write")(fname, text) - /proc/rustg_log_close_all() return call(RUST_G, "log_close_all")() +-#define rustg_log_write(fname, text, format) RUSTG_CALL(RUST_G, "log_write")(fname, text, format) +-/proc/rustg_log_close_all() return RUSTG_CALL(RUST_G, "log_close_all")() ++#define rustg_log_write(fname, text) RUSTG_CALL(RUST_G, "log_write")(fname, text) ++/proc/rustg_log_close_all() return RUSTG_CALL(RUST_G, "log_close_all")() diff --git a/src/log.rs b/src/log.rs index 9bd019b..6722353 100644 --- a/src/log.rs @@ -51,5 +52,5 @@ index 9bd019b..6722353 100644 Ok(()) -- -2.33.0.windows.2 +2.35.2.windows.1 diff --git a/paradise-rust-g-patches/0003-Paradise-API-Headers.patch b/paradise-rust-g-patches/0003-Paradise-API-Headers.patch index c3d658d..4a22d81 100644 --- a/paradise-rust-g-patches/0003-Paradise-API-Headers.patch +++ b/paradise-rust-g-patches/0003-Paradise-API-Headers.patch @@ -1,127 +1,203 @@ -From 11f3098faf5c6c388b6a24f548ef8cf2075b7321 Mon Sep 17 00:00:00 2001 +From 1bac400d13a18fa69dacf7571513de3c7d70ad54 Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Wed, 13 Oct 2021 22:11:10 +0100 Subject: [PATCH] Paradise API Headers +diff --git a/dmsrc/acreplace.dm b/dmsrc/acreplace.dm +index ada138c..6817453 100644 +--- a/dmsrc/acreplace.dm ++++ b/dmsrc/acreplace.dm +@@ -1,3 +1,4 @@ ++// Aho-Corasick Replace // + + /** + * Sets up the Aho-Corasick automaton with its default options. diff --git a/dmsrc/cellularnoise.dm b/dmsrc/cellularnoise.dm -index 2f48dd9..61303f7 100644 +index 2828fdc..9561032 100644 --- a/dmsrc/cellularnoise.dm +++ b/dmsrc/cellularnoise.dm @@ -1,3 +1,5 @@ -+// Cellular Noise Operations // ++// Cellular Noise // + /** * This proc generates a cellular automata noise grid which can be used in procedural generation methods. * +diff --git a/dmsrc/dbpnoise.dm b/dmsrc/dbpnoise.dm +index 2b3914d..702c5cf 100644 +--- a/dmsrc/dbpnoise.dm ++++ b/dmsrc/dbpnoise.dm +@@ -1,3 +1,5 @@ ++// Grid Perlin Noise // ++ + /** + * This proc generates a grid of perlin-like noise + * diff --git a/dmsrc/dmi.dm b/dmsrc/dmi.dm -index 6eed4e5..d3f271b 100644 +index f5d5fe5..d04b0d1 100644 --- a/dmsrc/dmi.dm +++ b/dmsrc/dmi.dm -@@ -1,3 +1,4 @@ +@@ -1,3 +1,5 @@ +// DMI Operations // - #define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname) - #define rustg_dmi_create_png(path, width, height, data) call(RUST_G, "dmi_create_png")(path, width, height, data) - #define rustg_dmi_resize_png(path, width, height, resizetype) call(RUST_G, "dmi_resize_png")(path, width, height, resizetype) ++ + #define rustg_dmi_strip_metadata(fname) RUSTG_CALL(RUST_G, "dmi_strip_metadata")(fname) + #define rustg_dmi_create_png(path, width, height, data) RUSTG_CALL(RUST_G, "dmi_create_png")(path, width, height, data) + #define rustg_dmi_resize_png(path, width, height, resizetype) RUSTG_CALL(RUST_G, "dmi_resize_png")(path, width, height, resizetype) diff --git a/dmsrc/file.dm b/dmsrc/file.dm -index e0c3033..9692a01 100644 +index c18d3f8..b285941 100644 --- a/dmsrc/file.dm +++ b/dmsrc/file.dm -@@ -1,3 +1,4 @@ +@@ -1,3 +1,5 @@ +// File Operations // - #define rustg_file_read(fname) call(RUST_G, "file_read")(fname) - #define rustg_file_exists(fname) call(RUST_G, "file_exists")(fname) - #define rustg_file_write(text, fname) call(RUST_G, "file_write")(text, fname) ++ + #define rustg_file_read(fname) RUSTG_CALL(RUST_G, "file_read")(fname) + #define rustg_file_exists(fname) RUSTG_CALL(RUST_G, "file_exists")(fname) + #define rustg_file_write(text, fname) RUSTG_CALL(RUST_G, "file_write")(text, fname) diff --git a/dmsrc/git.dm b/dmsrc/git.dm -index 0dc5edc..b3b8a4b 100644 +index b3185db..e718815 100644 --- a/dmsrc/git.dm +++ b/dmsrc/git.dm -@@ -1,2 +1,3 @@ +@@ -1,2 +1,4 @@ +-#define rustg_git_revparse(rev) RUSTG_CALL(RUST_G, "rg_git_revparse")(rev) +-#define rustg_git_commit_date(rev) RUSTG_CALL(RUST_G, "rg_git_commit_date")(rev) +// Git Operations // - #define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev) - #define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev) ++ ++#define rustg_git_revparse(rev) RUSTG_CALL(RUST_G, "rg_git_revparse")(rev) ++#define rustg_git_commit_date(rev) RUSTG_CALL(RUST_G, "rg_git_commit_date")(rev) diff --git a/dmsrc/hash.dm b/dmsrc/hash.dm -index 867b00e..673ee4e 100644 +index c666d2e..6354515 100644 --- a/dmsrc/hash.dm +++ b/dmsrc/hash.dm -@@ -1,3 +1,4 @@ -+// Hashing Operations // - #define rustg_hash_string(algorithm, text) call(RUST_G, "hash_string")(algorithm, text) - #define rustg_hash_file(algorithm, fname) call(RUST_G, "hash_file")(algorithm, fname) - #define rustg_hash_generate_totp(seed) call(RUST_G, "generate_totp")(seed) +@@ -1,3 +1,5 @@ ++// Hashing Functions // ++ + #define rustg_hash_string(algorithm, text) RUSTG_CALL(RUST_G, "hash_string")(algorithm, text) + #define rustg_hash_file(algorithm, fname) RUSTG_CALL(RUST_G, "hash_file")(algorithm, fname) + #define rustg_hash_generate_totp(seed) RUSTG_CALL(RUST_G, "generate_totp")(seed) diff --git a/dmsrc/http.dm b/dmsrc/http.dm -index 93d964b..c756919 100644 +index d63748d..eba7d68 100644 --- a/dmsrc/http.dm +++ b/dmsrc/http.dm -@@ -1,3 +1,4 @@ +@@ -1,3 +1,5 @@ +// HTTP Operations // - #define RUSTG_HTTP_METHOD_GET "get" - #define RUSTG_HTTP_METHOD_PUT "put" - #define RUSTG_HTTP_METHOD_DELETE "delete" ++ + #define RUSTG_HTTP_METHOD_GET "get" + #define RUSTG_HTTP_METHOD_PUT "put" + #define RUSTG_HTTP_METHOD_DELETE "delete" diff --git a/dmsrc/jobs.dm b/dmsrc/jobs.dm -index 499314b..c034d3c 100644 +index 499314b..46b95ca 100644 --- a/dmsrc/jobs.dm +++ b/dmsrc/jobs.dm -@@ -1,3 +1,4 @@ -+// Jobs Subsystem Operations // - #define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET" - #define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB" - #define RUSTG_JOB_ERROR "JOB PANICKED" +@@ -1,3 +1,5 @@ ++// Jobs Defines // ++ + #define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET" + #define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB" + #define RUSTG_JOB_ERROR "JOB PANICKED" diff --git a/dmsrc/json.dm b/dmsrc/json.dm -index 80a1853..013d2d1 100644 +index caa637c..c878c33 100644 --- a/dmsrc/json.dm +++ b/dmsrc/json.dm -@@ -1 +1,2 @@ +@@ -1 +1,3 @@ +// JSON Operations // - #define rustg_json_is_valid(text) (call(RUST_G, "json_is_valid")(text) == "true") ++ + #define rustg_json_is_valid(text) (RUSTG_CALL(RUST_G, "json_is_valid")(text) == "true") diff --git a/dmsrc/log.dm b/dmsrc/log.dm -index 9faa561..8e2000a 100644 +index bbc8fe6..75d6268 100644 --- a/dmsrc/log.dm +++ b/dmsrc/log.dm -@@ -1,2 +1,3 @@ +@@ -1,2 +1,4 @@ +// Logging Operations // - #define rustg_log_write(fname, text) call(RUST_G, "log_write")(fname, text) - /proc/rustg_log_close_all() return call(RUST_G, "log_close_all")() ++ + #define rustg_log_write(fname, text) RUSTG_CALL(RUST_G, "log_write")(fname, text) + /proc/rustg_log_close_all() return RUSTG_CALL(RUST_G, "log_close_all")() diff --git a/dmsrc/noise.dm b/dmsrc/noise.dm -index 6277a46..0192899 100644 +index 5630600..f05e0d3 100644 --- a/dmsrc/noise.dm +++ b/dmsrc/noise.dm -@@ -1 +1,2 @@ +@@ -1 +1,3 @@ +// Noise Operations // - #define rustg_noise_get_at_coordinates(seed, x, y) call(RUST_G, "noise_get_at_coordinates")(seed, x, y) ++ + #define rustg_noise_get_at_coordinates(seed, x, y) RUSTG_CALL(RUST_G, "noise_get_at_coordinates")(seed, x, y) +diff --git a/dmsrc/pathfinder.dm b/dmsrc/pathfinder.dm +index 3259aa8..d229569 100644 +--- a/dmsrc/pathfinder.dm ++++ b/dmsrc/pathfinder.dm +@@ -1,3 +1,5 @@ ++// AStar Operations // ++ + /** + * Register a list of nodes into a rust library. This list of nodes must have been serialized in a json. + * Node {// Index of this node in the list of nodes +diff --git a/dmsrc/redis-pubsub.dm b/dmsrc/redis-pubsub.dm +index 842f1bf..a3c3558 100644 +--- a/dmsrc/redis-pubsub.dm ++++ b/dmsrc/redis-pubsub.dm +@@ -1,3 +1,5 @@ ++// Redis PubSub Operations // ++ + #define RUSTG_REDIS_ERROR_CHANNEL "RUSTG_REDIS_ERROR_CHANNEL" + + #define rustg_redis_connect(addr) RUSTG_CALL(RUST_G, "redis_connect")(addr) diff --git a/dmsrc/sql.dm b/dmsrc/sql.dm -index d3bfc49..3f1d92f 100644 +index cad44b5..d4d3e68 100644 --- a/dmsrc/sql.dm +++ b/dmsrc/sql.dm -@@ -1,3 +1,4 @@ -+// SQL Opeartions // - #define rustg_sql_connect_pool(options) call(RUST_G, "sql_connect_pool")(options) - #define rustg_sql_query_async(handle, query, params) call(RUST_G, "sql_query_async")(handle, query, params) - #define rustg_sql_query_blocking(handle, query, params) call(RUST_G, "sql_query_blocking")(handle, query, params) +@@ -1,3 +1,5 @@ ++// SQL Operations // ++ + #define rustg_sql_connect_pool(options) RUSTG_CALL(RUST_G, "sql_connect_pool")(options) + #define rustg_sql_query_async(handle, query, params) RUSTG_CALL(RUST_G, "sql_query_async")(handle, query, params) + #define rustg_sql_query_blocking(handle, query, params) RUSTG_CALL(RUST_G, "sql_query_blocking")(handle, query, params) +diff --git a/dmsrc/time.dm b/dmsrc/time.dm +index f4ac5e5..ca5b686 100644 +--- a/dmsrc/time.dm ++++ b/dmsrc/time.dm +@@ -1,3 +1,5 @@ ++// Time Tracking Functions // ++ + #define rustg_time_microseconds(id) text2num(RUSTG_CALL(RUST_G, "time_microseconds")(id)) + #define rustg_time_milliseconds(id) text2num(RUSTG_CALL(RUST_G, "time_milliseconds")(id)) + #define rustg_time_reset(id) RUSTG_CALL(RUST_G, "time_reset")(id) diff --git a/dmsrc/toml.dm b/dmsrc/toml.dm -index e403301..46010e5 100644 +index b490d95..dddce55 100644 --- a/dmsrc/toml.dm +++ b/dmsrc/toml.dm -@@ -1 +1,2 @@ +@@ -1,3 +1,5 @@ +// TOML Operations // - #define rustg_read_toml_file(path) json_decode(call(RUST_G, "toml_file_to_json")(path) || "null") ++ + #define rustg_raw_read_toml_file(path) json_decode(RUSTG_CALL(RUST_G, "toml_file_to_json")(path) || "null") + + /proc/rustg_read_toml_file(path) diff --git a/dmsrc/unzip.dm b/dmsrc/unzip.dm -index ce945b1..970d673 100644 +index 77e79de..66df598 100644 --- a/dmsrc/unzip.dm +++ b/dmsrc/unzip.dm -@@ -1,2 +1,3 @@ -+// Unzip Operations // - #define rustg_unzip_download_async(url, unzip_directory) call(RUST_G, "unzip_download_async")(url, unzip_directory) - #define rustg_unzip_check(job_id) call(RUST_G, "unzip_check")("[job_id]") +@@ -1,2 +1,4 @@ ++// ZIP File Operations // ++ + #define rustg_unzip_download_async(url, unzip_directory) RUSTG_CALL(RUST_G, "unzip_download_async")(url, unzip_directory) + #define rustg_unzip_check(job_id) RUSTG_CALL(RUST_G, "unzip_check")("[job_id]") diff --git a/dmsrc/url.dm b/dmsrc/url.dm -index b56131b..5e59114 100644 +index 3f53e25..a019a13 100644 --- a/dmsrc/url.dm +++ b/dmsrc/url.dm -@@ -1,3 +1,4 @@ -+// URL Encoder/Decoder Operations // - #define rustg_url_encode(text) call(RUST_G, "url_encode")("[text]") - #define rustg_url_decode(text) call(RUST_G, "url_decode")(text) - +@@ -1,3 +1,5 @@ ++// URL Operations // ++ + #define rustg_url_encode(text) RUSTG_CALL(RUST_G, "url_encode")("[text]") + #define rustg_url_decode(text) RUSTG_CALL(RUST_G, "url_decode")(text) + +diff --git a/dmsrc/worleynoise.dm b/dmsrc/worleynoise.dm +index 379adfc..ccaa166 100644 +--- a/dmsrc/worleynoise.dm ++++ b/dmsrc/worleynoise.dm +@@ -1,3 +1,5 @@ ++// Worley Noise Operations // ++ + /** + * This proc generates a noise grid using worley noise algorithm + * -- -2.33.0.windows.2 +2.35.2.windows.1 diff --git a/paradise-rust-g-patches/0004-Paradise-DLL-Location-Fix.patch b/paradise-rust-g-patches/0004-Paradise-DLL-Location-Fix.patch index 71874d2..41e0364 100644 --- a/paradise-rust-g-patches/0004-Paradise-DLL-Location-Fix.patch +++ b/paradise-rust-g-patches/0004-Paradise-DLL-Location-Fix.patch @@ -1,22 +1,22 @@ -From 9205943c2ead317cd6451ea9e4f0372685e8d2bb Mon Sep 17 00:00:00 2001 +From 6b7699bf39674cd6f84eb90662bad77247343b21 Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Wed, 13 Oct 2021 22:16:17 +0100 Subject: [PATCH] Paradise DLL Location Fix diff --git a/dmsrc/main.dm b/dmsrc/main.dm -index bd4497a..23afef1 100644 +index bd4497a..35c1c72 100644 --- a/dmsrc/main.dm +++ b/dmsrc/main.dm @@ -33,7 +33,7 @@ - // It's not in the current directory, so try others - return __rust_g = "librust_g.so" - else -- return __rust_g = "rust_g" + // It's not in the current directory, so try others + return __rust_g = "librust_g.so" + else +- return __rust_g = "rust_g" + return __rust_g = "rust_g.dll" - - #define RUST_G (__rust_g || __detect_rust_g()) - #endif + + #define RUST_G (__rust_g || __detect_rust_g()) + #endif -- -2.33.0.windows.2 +2.17.1 diff --git a/paradise-rust-g-patches/0005-Paradise-HTTP-Module-Tweaks.patch b/paradise-rust-g-patches/0005-Paradise-HTTP-Module-Tweaks.patch index 16afcb8..f713d06 100644 --- a/paradise-rust-g-patches/0005-Paradise-HTTP-Module-Tweaks.patch +++ b/paradise-rust-g-patches/0005-Paradise-HTTP-Module-Tweaks.patch @@ -1,19 +1,27 @@ -From 8a6dadb046618da8cbd32d6651d3e27d36da9d9d Mon Sep 17 00:00:00 2001 +From 81098ac672c0e1f44dfb7d511453439c4799ed54 Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:50:14 +0100 Subject: [PATCH] Paradise HTTP Module Tweaks diff --git a/dmsrc/http.dm b/dmsrc/http.dm -index e74e6d0..ba37ab3 100644 +index eba7d68..fdcf7a7 100644 --- a/dmsrc/http.dm +++ b/dmsrc/http.dm -@@ -8,3 +8,5 @@ - #define rustg_http_request_blocking(method, url, body, headers, options) call(RUST_G, "http_request_blocking")(method, url, body, headers, options) - #define rustg_http_request_async(method, url, body, headers, options) call(RUST_G, "http_request_async")(method, url, body, headers, options) - #define rustg_http_check_request(req_id) call(RUST_G, "http_check_request")(req_id) -+/proc/rustg_create_async_http_client() return call(RUST_G, "start_http_client")() -+/proc/rustg_close_async_http_client() return call(RUST_G, "shutdown_http_client")() +@@ -1,5 +1,5 @@ +-// HTTP Operations // +- ++// HTTP Operations // ++ + #define RUSTG_HTTP_METHOD_GET "get" + #define RUSTG_HTTP_METHOD_PUT "put" + #define RUSTG_HTTP_METHOD_DELETE "delete" +@@ -9,3 +9,5 @@ + #define rustg_http_request_blocking(method, url, body, headers, options) RUSTG_CALL(RUST_G, "http_request_blocking")(method, url, body, headers, options) + #define rustg_http_request_async(method, url, body, headers, options) RUSTG_CALL(RUST_G, "http_request_async")(method, url, body, headers, options) + #define rustg_http_check_request(req_id) RUSTG_CALL(RUST_G, "http_check_request")(req_id) ++/proc/rustg_create_async_http_client() return RUSTG_CALL(RUST_G, "start_http_client")() ++/proc/rustg_close_async_http_client() return RUSTG_CALL(RUST_G, "shutdown_http_client")() diff --git a/src/http.rs b/src/http.rs index 5da2ff1..426f869 100644 --- a/src/http.rs @@ -166,5 +174,5 @@ index 16b5009..9b5d5c5 100644 req, unzip_directory: dir_copy, -- -2.33.0.windows.2 +2.35.2.windows.1 diff --git a/tg-rust-g b/tg-rust-g deleted file mode 160000 index b8ee3af..0000000 --- a/tg-rust-g +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b8ee3af967dd00b4508c1b2f4e33c8a2d557a467