diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-06-08 17:26:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-08 17:26:33 -0400 |
| commit | 3913091a021a8f4525f0050dfb83d1c2b8fc6f6b (patch) | |
| tree | 32d7560aa9ca037db8c156776b83785cac7994f0 /source/core/slang-string.h | |
| parent | c492288b4778b19bd66ac31edb076add096e757d (diff) | |
Improvements around StringBlob (#2921)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Small fixes and improvements around reflection tool.
* Make PrettyWriter printing a class.
* Improvements around handling StringBlob and storing stdlib source in ISlangBlob.
* Fix some issues with comments around StringBlob.
* Default initialize StringBlob fields.
Diffstat (limited to 'source/core/slang-string.h')
| -rw-r--r-- | source/core/slang-string.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h index 429a60c46..b4583d0b2 100644 --- a/source/core/slang-string.h +++ b/source/core/slang-string.h @@ -474,8 +474,12 @@ namespace Slang /// Append data written to buffer output via 'prepareForAppend' directly written 'inplace' void appendInPlace(const char* chars, Index count); + /// Get the internal string represenation SLANG_FORCE_INLINE StringRepresentation* getStringRepresentation() const { return m_buffer; } + /// Detach the representation (will leave string as empty). Rep ref count will remain unchanged. + SLANG_FORCE_INLINE StringRepresentation* detachStringRepresentation() { return m_buffer.detach(); } + const char* begin() const { return getData(); |
