diff --git a/dexed-d/src/ddemangle.d b/dexed-d/src/ddemangle.d index 380bdf9b..baee5885 100644 --- a/dexed-d/src/ddemangle.d +++ b/dexed-d/src/ddemangle.d @@ -3,6 +3,7 @@ module ddemangle; import core.demangle : demangle; import std.regex : replaceAll, Captures, regex, Regex; import core.stdc.string : strlen; +import std.string : toStringz; extern(C): @@ -15,7 +16,7 @@ const(char)* ddemangle(const(char)* line) reInit = true; reDemangle = regex(r"\b_?_D[0-9a-zA-Z_]+\b"); } - return replaceAll!(demangleMatch)(line[0 .. line.strlen], reDemangle).ptr; + return replaceAll!(demangleMatch)(line[0 .. line.strlen], reDemangle).toStringz; } extern(D): private: diff --git a/dexed-d/src/ddoc_template.d b/dexed-d/src/ddoc_template.d index 70e4a452..5321fc9c 100644 --- a/dexed-d/src/ddoc_template.d +++ b/dexed-d/src/ddoc_template.d @@ -3,7 +3,7 @@ module ddoc_template; import core.stdc.string; import - std.array, std.conv; + std.array, std.conv, std.string; import iz.memory, iz.sugar; import @@ -65,7 +65,7 @@ public: c2 = plusComment ? "++" : "**"; } - const(char)* result() { return app.data.ptr; } + const(char)* result() { return app.data.toStringz(); } override void visit(const(ThrowStatement) ts) { diff --git a/dexed-d/src/halstead.d b/dexed-d/src/halstead.d index 83475057..97dbdedb 100644 --- a/dexed-d/src/halstead.d +++ b/dexed-d/src/halstead.d @@ -3,7 +3,7 @@ module halstead; import core.stdc.string; import - std.algorithm, std.conv, std.json, std.meta; + std.algorithm, std.conv, std.json, std.meta, std.string; import std.stdio, std.ascii, std.digest.crc, std.range: iota; import @@ -138,7 +138,7 @@ private final class HalsteadMetric: ASTVisitor { JSONValue js; js["functions"] = fs; - return js.toString.ptr; + return js.toString.toStringz(); } override void visit(const(PragmaExpression)){} diff --git a/dexed-d/src/symlist.d b/dexed-d/src/symlist.d index d8f5f594..d24efaa9 100644 --- a/dexed-d/src/symlist.d +++ b/dexed-d/src/symlist.d @@ -4,7 +4,7 @@ import core.stdc.string; import std.array, std.traits, std.conv, std.json, std.format, - std.algorithm; + std.algorithm, std.string; import iz.memory: construct, destruct; import @@ -157,16 +157,16 @@ final class SymbolListBuilder(ListFmt Fmt): ASTVisitor static if (Fmt == ListFmt.Pas) { pasStream.put(">\rend"); - return pasStream.data.ptr; + return pasStream.data.toStringz; } else { JSONValue result = parseJSON("{}"); result["items"] = json; version (assert) - return result.toPrettyString.ptr; + return result.toPrettyString.toStringz; else - return result.toString.ptr; + return result.toString.toStringz; } } diff --git a/dexed-d/src/todos.d b/dexed-d/src/todos.d index 56242e95..abb48e6b 100644 --- a/dexed-d/src/todos.d +++ b/dexed-d/src/todos.d @@ -25,7 +25,7 @@ extern(C) const(char)* todoItems(const(char)* joinedFiles) analyze(token, fname, stream); } stream.put(">end"); - return stream.data.ptr; + return stream.data.toStringz(); } private void analyze(const(Token) token, const(char)[] fname, ref Appender!string stream)