From b11b53b72cebe85b0fd2a6c8e18c0aca3cf16430 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 31 May 2023 16:33:01 -0400 Subject: SL-18330: Change to strip_deprecated_header(size_t* header_size) from U32*. --- indra/llcommon/llsdserialize.cpp | 2 +- indra/llcommon/llsdserialize.h | 2 +- indra/newview/llmeshrepository.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index c8dbcb2404..9181600f23 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -2388,7 +2388,7 @@ U8* unzip_llsdNavMesh( bool& valid, size_t& outsize, std::istream& is, S32 size return result; } -char* strip_deprecated_header(char* in, llssize& cur_size, U32* header_size) +char* strip_deprecated_header(char* in, llssize& cur_size, size_t* header_size) { const char* deprecated_header = ""; constexpr size_t deprecated_header_size = 17; diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h index 5ddf0ff552..0957ba9714 100644 --- a/indra/llcommon/llsdserialize.h +++ b/indra/llcommon/llsdserialize.h @@ -873,5 +873,5 @@ LL_COMMON_API std::string zip_llsd(LLSD& data); LL_COMMON_API U8* unzip_llsdNavMesh( bool& valid, size_t& outsize,std::istream& is, S32 size); // returns a pointer to the array or past the array if the deprecated header exists -LL_COMMON_API char* strip_deprecated_header(char* in, llssize& cur_size, U32* header_size = nullptr); +LL_COMMON_API char* strip_deprecated_header(char* in, llssize& cur_size, size_t* header_size = nullptr); #endif // LL_LLSDSERIALIZE_H diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 18420a2356..3e7f79b60a 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1861,8 +1861,8 @@ EMeshProcessingResult LLMeshRepoThread::headerReceived(const LLVolumeParams& mes { const LLUUID mesh_id = mesh_params.getSculptID(); LLSD header; - - U32 header_size = 0; + + size_t header_size = 0; if (data_size > 0) { llssize dsize = data_size; -- cgit v1.2.3 From ed92f1d8034dcaa84f808b3267c772202e7ce113 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 31 May 2023 16:34:04 -0400 Subject: SL-18330: Consistently use new standalone Python llsd package. --- indra/llcommon/tests/llleap_test.cpp | 2 +- indra/llcommon/tests/llsdserialize_test.cpp | 2 +- indra/llcorehttp/tests/test_llcorehttp_peer.py | 2 +- indra/llmessage/tests/test_llsdmessage_peer.py | 4 ++-- indra/newview/viewer_manifest.py | 2 +- scripts/metrics/slp_conv.py | 2 +- scripts/metrics/viewer_asset_logs.py | 2 +- scripts/metrics/viewerstats.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index 7ee36a9ea6..60005fc6a9 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -109,7 +109,7 @@ namespace tut "import os\n" "import sys\n" "\n" - "from llbase import llsd\n" + "import llsd\n" "\n" "class ProtocolError(Exception):\n" " def __init__(self, msg, data):\n" diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp index c246f5ee56..be7ec12094 100644 --- a/indra/llcommon/tests/llsdserialize_test.cpp +++ b/indra/llcommon/tests/llsdserialize_test.cpp @@ -1706,7 +1706,7 @@ namespace tut // scanner. import_llsd("import os.path\n" "import sys\n" - "from llbase import llsd\n") + "import llsd\n") {} ~TestPythonCompatible() {} diff --git a/indra/llcorehttp/tests/test_llcorehttp_peer.py b/indra/llcorehttp/tests/test_llcorehttp_peer.py index 185e8e25c6..b9992538ba 100755 --- a/indra/llcorehttp/tests/test_llcorehttp_peer.py +++ b/indra/llcorehttp/tests/test_llcorehttp_peer.py @@ -38,7 +38,7 @@ from io import StringIO from http.server import HTTPServer, BaseHTTPRequestHandler -from llbase import llsd +import llsd # we're in llcorehttp/tests ; testrunner.py is found in llmessage/tests sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py index 5ba0749e31..8e9b6c09e7 100755 --- a/indra/llmessage/tests/test_llsdmessage_peer.py +++ b/indra/llmessage/tests/test_llsdmessage_peer.py @@ -33,8 +33,8 @@ import os import sys from http.server import HTTPServer, BaseHTTPRequestHandler -from llbase.fastest_elementtree import parse as xml_parse -from llbase import llsd +from llsd.fastest_elementtree import parse as xml_parse +import llsd from testrunner import freeport, run, debug, VERBOSE import time diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 89481add29..8a6a9b7b68 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -49,7 +49,7 @@ viewer_dir = os.path.dirname(__file__) # indra.util.llmanifest under their system Python! sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python")) from indra.util.llmanifest import LLManifest, main, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL, ManifestError, MissingError -from llbase import llsd +import llsd class ViewerManifest(LLManifest): def is_packaging_viewer(self): diff --git a/scripts/metrics/slp_conv.py b/scripts/metrics/slp_conv.py index 27f922b74a..25f9a8c060 100644 --- a/scripts/metrics/slp_conv.py +++ b/scripts/metrics/slp_conv.py @@ -29,7 +29,7 @@ Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA $/LicenseInfo$ """ -from llbase import llsd +import llsd import argparse parser = argparse.ArgumentParser( diff --git a/scripts/metrics/viewer_asset_logs.py b/scripts/metrics/viewer_asset_logs.py index 0365936188..bd996dff79 100644 --- a/scripts/metrics/viewer_asset_logs.py +++ b/scripts/metrics/viewer_asset_logs.py @@ -28,7 +28,7 @@ $/LicenseInfo$ import argparse from lxml import etree -from llbase import llsd +import llsd def get_metrics_record(infiles): for filename in args.infiles: diff --git a/scripts/metrics/viewerstats.py b/scripts/metrics/viewerstats.py index 7e19539e15..e64343329c 100755 --- a/scripts/metrics/viewerstats.py +++ b/scripts/metrics/viewerstats.py @@ -31,7 +31,7 @@ import numpy as np import pandas as pd import json from collections import Counter, defaultdict -from llbase import llsd +import llsd import io import re import os -- cgit v1.2.3 From 364516e8bc19f6435fd42893809080d4f64a3232 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 1 Jun 2023 11:34:48 -0400 Subject: DRTVWR-575: GCC prefers std::make_signed for llssize. --- indra/llcommon/stdtypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/stdtypes.h b/indra/llcommon/stdtypes.h index da8512169c..0b43d7ad4b 100644 --- a/indra/llcommon/stdtypes.h +++ b/indra/llcommon/stdtypes.h @@ -41,7 +41,7 @@ typedef unsigned int U32; // to express an index that might go negative // (ssize_t is provided by SOME compilers, don't collide) -typedef typename std::make_signed::type llssize; +typedef typename std::make_signed::type llssize; #if LL_WINDOWS // https://docs.microsoft.com/en-us/cpp/build/reference/zc-wchar-t-wchar-t-is-native-type -- cgit v1.2.3