Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rsp support #32

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
documentation
John-Colvin committed May 3, 2018
commit 47ad4873bf5649834f0df74262cb4dd73b82e001
5 changes: 5 additions & 0 deletions source/dpp/runtime/response.d
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@ import core.stdc.stdio;
import core.stdc.stdlib;
import core.stdc.string;

/// wrapper to make response_expand usable
/// with strings. Yes, it allocates a lot.
string[] response_expand(string[] args) @trusted
{
import std.algorithm : map;
@@ -34,6 +36,9 @@ const(char)* toConstStringz(string s) @safe
return &r[0];
}

// ported from dmd's function of the same name.
// only modifications are to use builtin arrays
// and phobos in place of dmd's bespoke types
bool response_expand(ref const(char)*[] args)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was gonna port some dmd tests for this function as well, but..... I couldn't find them. I suspect they don't exist

{
import std.algorithm : remove;