mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
Revert "Merge pull request #2905 from 9rnsr/revert_pull2902"
This reverts commit80f463a1e2
, reversing changes made to588c76c19b
.
This commit is contained in:
parent
e453ecec38
commit
4c737a672f
2 changed files with 9 additions and 29 deletions
|
@ -312,24 +312,13 @@ class OutBuffer
|
||||||
|
|
||||||
void printf(string format, ...) @trusted
|
void printf(string format, ...) @trusted
|
||||||
{
|
{
|
||||||
version (Win64)
|
va_list ap;
|
||||||
{
|
static if (is(typeof(__va_argsave)))
|
||||||
vprintf(format, _argptr);
|
|
||||||
}
|
|
||||||
else version (X86_64)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
va_start(ap, __va_argsave);
|
va_start(ap, __va_argsave);
|
||||||
vprintf(format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
va_start(ap, format);
|
||||||
va_list ap;
|
vprintf(format, ap);
|
||||||
ap = cast(va_list)&format;
|
va_end(ap);
|
||||||
ap += format.sizeof;
|
|
||||||
vprintf(format, ap);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************
|
/*****************************************
|
||||||
|
|
17
std/stream.d
17
std/stream.d
|
@ -1204,25 +1204,16 @@ class Stream : InputStream, OutputStream {
|
||||||
|
|
||||||
// writes data to stream using printf() syntax,
|
// writes data to stream using printf() syntax,
|
||||||
// returns number of bytes written
|
// returns number of bytes written
|
||||||
version (Win64)
|
|
||||||
size_t printf(const(char)[] format, ...) {
|
|
||||||
return vprintf(format, _argptr);
|
|
||||||
}
|
|
||||||
else version (X86_64)
|
|
||||||
size_t printf(const(char)[] format, ...) {
|
size_t printf(const(char)[] format, ...) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, __va_argsave);
|
static if (is(typeof(__va_argsave)))
|
||||||
|
va_start(ap, __va_argsave);
|
||||||
|
else
|
||||||
|
va_start(ap, format);
|
||||||
auto result = vprintf(format, ap);
|
auto result = vprintf(format, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
size_t printf(const(char)[] format, ...) {
|
|
||||||
va_list ap;
|
|
||||||
ap = cast(va_list) &format;
|
|
||||||
ap += format.sizeof;
|
|
||||||
return vprintf(format, ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void doFormatCallback(dchar c) {
|
private void doFormatCallback(dchar c) {
|
||||||
char[4] buf;
|
char[4] buf;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue