mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 21:51:40 +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
|
@ -311,26 +311,15 @@ class OutBuffer
|
|||
*/
|
||||
|
||||
void printf(string format, ...) @trusted
|
||||
{
|
||||
version (Win64)
|
||||
{
|
||||
vprintf(format, _argptr);
|
||||
}
|
||||
else version (X86_64)
|
||||
{
|
||||
va_list ap;
|
||||
static if (is(typeof(__va_argsave)))
|
||||
va_start(ap, __va_argsave);
|
||||
else
|
||||
va_start(ap, format);
|
||||
vprintf(format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
else
|
||||
{
|
||||
va_list ap;
|
||||
ap = cast(va_list)&format;
|
||||
ap += format.sizeof;
|
||||
vprintf(format, ap);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
* At offset index into buffer, create nbytes of space by shifting upwards
|
||||
|
|
15
std/stream.d
15
std/stream.d
|
@ -1204,25 +1204,16 @@ class Stream : InputStream, OutputStream {
|
|||
|
||||
// writes data to stream using printf() syntax,
|
||||
// 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, ...) {
|
||||
va_list ap;
|
||||
static if (is(typeof(__va_argsave)))
|
||||
va_start(ap, __va_argsave);
|
||||
else
|
||||
va_start(ap, format);
|
||||
auto result = vprintf(format, ap);
|
||||
va_end(ap);
|
||||
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) {
|
||||
char[4] buf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue