Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions README/ReleaseNotes/v642/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ For more information, see:

[http://root.cern](http://root.cern)

The following people have contributed to this new version:

The following people have contributed to this new version:

Bertrand Bellenot, CERN/EP-SFT,\
Expand Down Expand Up @@ -67,8 +65,9 @@ Users are encouraged to export their models to ONNX and use the retained ONNX pa
* The **RooStats::DebuggingSampler** and **RooStats::DebuggingTestStat** classes are removed. They were mock implementations of the `TestStatSampler` and `TestStatistic` interfaces that returned uniform random numbers independent of the data, only meant for debugging the RooStats framework itself during its initial development.
* The `RooTrace` class is deprecated and will be removed in ROOT 6.44. It was a RooFit-specific memory tracer whose instrumentation hooks are compiled out by default, so it has been inert and untested for years. For memory debugging, please use general-purpose tools such as AddressSanitizer or Valgrind instead.
* Support for the AIX operating system has been removed from the codebase. This support has not been tested since the late v5 releases and the LLVM JIT is not yet supporting AIX.
* The headers Htypes.h and Gtypes.h that were deprecated in ROOT 6.20 will now emit warnings and will be fully removed in ROOT 6.44.
* The header GLConstants.h is no longer part of ROOT installed headers.
* The headers `Htypes.h` and `Gtypes.h` that were deprecated in ROOT 6.20 will now emit warnings and will be fully removed in ROOT 6.44. Use `Rtypes.h` instead.
* The header `GLConstants.h` is no longer part of ROOT installed headers.
* The header `Varargs.h` and the macro `R__VA_COPY` are deprecated and will be removed in ROOT 6.46, use `<cstdarg>` instead.
* The `ROOT::Math::ParamFunctionBase`, `ROOT::Math::ParamFunctorHandler` and `ROOT::Math::ParamMemFunHandler` classes in `Math/ParamFunctor.h` are removed, together with the `ParamFunctor::GetImpl()` and `ParamFunctor::SetFunction()` methods that exposed them. They implemented the type erasure that `ParamFunctor` now gets from `std::function`, mirroring what was already done for `ROOT::Math::Functor`. Constructing and calling a `ParamFunctor` is unchanged, except that the constructor from an object and one of its member functions now takes a plain pointer to the object instead of anything dereferenceable, so smart pointers are no longer accepted there.

## Build System
Expand Down
4 changes: 0 additions & 4 deletions cmake/unix/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ module ROOT_Rtypes {
// They are mainly needed for ROOT stage1 build.
module ROOT_Foundation_Stage1_NoRTTI {
module "ESTLType.h" { header "ESTLType.h" export * }
// Varargs contains a lot of macros for supporting the obsolete va_args.
// FIXME: We may want to drop this when we reimplement all uses to use variadic
// templates.
module "Varargs.h" { header "Varargs.h" export * }
module "TClassEdit.h" { header "TClassEdit.h" export * }
module "TIsAProxy.h" { header "TIsAProxy.h" export * }
module "TVirtualIsAProxy.h" { header "TVirtualIsAProxy.h" export * }
Expand Down
2 changes: 1 addition & 1 deletion core/base/inc/RQ_OBJECT.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define ROOT_RQ_OBJECT

#include <TQObject.h>
#include <Varargs.h>
#include <cstdarg>


//---- RQ_OBJECT macro -----------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions core/base/inc/Varargs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#ifndef ROOT_Varargs
#define ROOT_Varargs

#warning "The header Varargs.h is deprecated and will be removed in ROOT 6.46, include <cstdarg> instead."

#if defined(sparc) && defined(__CC_ATT301__)

extern "C" __builtin_va_arg_incr(...);
Expand Down
2 changes: 1 addition & 1 deletion core/base/src/TErrorDefaultHandler.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include <TError.h>
#include <ThreadLocalStorage.h>
#include <TSystem.h>
#include <Varargs.h>

#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cctype> // for tolower
Expand Down
56 changes: 28 additions & 28 deletions core/base/src/TObject.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ class hierarchies (watch out for overlaps).
that the object was allocated on the heap).
*/

#include <cstring>
#if !defined(WIN32) && !defined(__MWERKS__) && !defined(R__SOLARIS)
#include <strings.h>
#endif
#include <cstdlib>
#include <cstdio>
#include <sstream>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <limits>

#include "Varargs.h"
#include "snprintf.h"
#include "TObject.h"
#include "TBuffer.h"
Expand All @@ -64,6 +51,19 @@ class hierarchies (watch out for overlaps).
#include "TRefTable.h"
#include "TProcessID.h"

#include <cstring>
#if !defined(WIN32) && !defined(__MWERKS__) && !defined(R__SOLARIS)
#include <strings.h>
#endif
#include <cstdarg>
#include <cstdlib>
#include <cstdio>
#include <sstream>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <limits>

Longptr_t TObject::fgDtorOnly = 0;
Bool_t TObject::fgObjectStat = kTRUE;

Expand Down Expand Up @@ -1067,23 +1067,23 @@ void TObject::DoError(int level, const char *location, const char *fmt, va_list
/// Issue info message. Use "location" to specify the method where the
/// warning occurred. Accepts standard printf formatting arguments.

void TObject::Info(const char *location, const char *va_(fmt), ...) const
void TObject::Info(const char *location, const char *fmt, ...) const
{
va_list ap;
va_start(ap, va_(fmt));
DoError(kInfo, location, va_(fmt), ap);
va_start(ap, fmt);
DoError(kInfo, location, fmt, ap);
va_end(ap);
}

////////////////////////////////////////////////////////////////////////////////
/// Issue warning message. Use "location" to specify the method where the
/// warning occurred. Accepts standard printf formatting arguments.

void TObject::Warning(const char *location, const char *va_(fmt), ...) const
void TObject::Warning(const char *location, const char *fmt, ...) const
{
va_list ap;
va_start(ap, va_(fmt));
DoError(kWarning, location, va_(fmt), ap);
va_start(ap, fmt);
DoError(kWarning, location, fmt, ap);
va_end(ap);
if (TROOT::Initialized())
gROOT->Message(1001, this);
Expand All @@ -1093,11 +1093,11 @@ void TObject::Warning(const char *location, const char *va_(fmt), ...) const
/// Issue error message. Use "location" to specify the method where the
/// error occurred. Accepts standard printf formatting arguments.

void TObject::Error(const char *location, const char *va_(fmt), ...) const
void TObject::Error(const char *location, const char *fmt, ...) const
{
va_list ap;
va_start(ap, va_(fmt));
DoError(kError, location, va_(fmt), ap);
va_start(ap, fmt);
DoError(kError, location, fmt, ap);
va_end(ap);
if (TROOT::Initialized())
gROOT->Message(1002, this);
Expand All @@ -1107,11 +1107,11 @@ void TObject::Error(const char *location, const char *va_(fmt), ...) const
/// Issue system error message. Use "location" to specify the method where
/// the system error occurred. Accepts standard printf formatting arguments.

void TObject::SysError(const char *location, const char *va_(fmt), ...) const
void TObject::SysError(const char *location, const char *fmt, ...) const
{
va_list ap;
va_start(ap, va_(fmt));
DoError(kSysError, location, va_(fmt), ap);
va_start(ap, fmt);
DoError(kSysError, location, fmt, ap);
va_end(ap);
if (TROOT::Initialized())
gROOT->Message(1003, this);
Expand All @@ -1121,11 +1121,11 @@ void TObject::SysError(const char *location, const char *va_(fmt), ...) const
/// Issue fatal error message. Use "location" to specify the method where the
/// fatal error occurred. Accepts standard printf formatting arguments.

void TObject::Fatal(const char *location, const char *va_(fmt), ...) const
void TObject::Fatal(const char *location, const char *fmt, ...) const
{
va_list ap;
va_start(ap, va_(fmt));
DoError(kFatal, location, va_(fmt), ap);
va_start(ap, fmt);
DoError(kFatal, location, fmt, ap);
va_end(ap);
if (TROOT::Initialized())
gROOT->Message(1004, this);
Expand Down
49 changes: 25 additions & 24 deletions core/base/src/TString.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,7 @@ as a TString, construct a TString from it, eg:
*/

#include <ROOT/RConfig.hxx>
#include <cstdlib>
#include <cctype>
#include <list>
#include <algorithm>

#include "Varargs.h"
#include "strlcpy.h"
#include "TString.h"
#include "TBuffer.h"
Expand All @@ -62,6 +57,12 @@ as a TString, construct a TString from it, eg:
#include "TVirtualMutex.h"
#include "ThreadLocalStorage.h"

#include <cstdarg>
#include <cstdlib>
#include <cctype>
#include <list>
#include <algorithm>

#if defined(R__WIN32)
#define strtoull _strtoui64
#endif
Expand Down Expand Up @@ -2390,7 +2391,7 @@ TObjArray *TString::Tokenize(const TString &delim) const
void TString::FormImp(const char *fmt, va_list ap)
{
va_list ap_len;
R__VA_COPY(ap_len, ap);
va_copy(ap_len, ap);

// First pass: determine required size (excluding '\0')
int n = vsnprintf(nullptr, 0, fmt, ap_len);
Expand All @@ -2412,7 +2413,7 @@ void TString::FormImp(const char *fmt, va_list ap)
}

va_list ap_out;
R__VA_COPY(ap_out, ap);
va_copy(ap_out, ap);
vsnprintf(GetPointer(), needed, fmt, ap_out);
va_end(ap_out);

Expand All @@ -2434,11 +2435,11 @@ void TString::FormImp(const char *fmt, va_list ap)
/// Note: this is not to be confused with ::Format and ::Form (in the global namespace)
/// which returns a const char* and relies on a thread-local static character buffer.

void TString::Form(const char *va_(fmt), ...)
void TString::Form(const char *fmt, ...)
{
va_list ap;
va_start(ap, va_(fmt));
FormImp(va_(fmt), ap);
va_start(ap, fmt);
FormImp(fmt, ap);
va_end(ap);
}

Expand All @@ -2456,12 +2457,12 @@ void TString::Form(const char *va_(fmt), ...)
/// Note: this is not to be confused with ::Format and ::Form (in the global namespace)
/// which returns a const char* and relies on a thread-local static character buffer.

TString TString::Format(const char *va_(fmt), ...)
TString TString::Format(const char *fmt, ...)
{
va_list ap;
va_start(ap, va_(fmt));
va_start(ap, fmt);
TString str;
str.FormImp(va_(fmt), ap);
str.FormImp(fmt, ap);
va_end(ap);
return str;
}
Expand Down Expand Up @@ -2491,7 +2492,7 @@ static char *SlowFormat(const char *format, va_list ap, int hint)
}

va_list sap;
R__VA_COPY(sap, ap);
va_copy(sap, ap);

int n = vsnprintf(slowBuffer, slowBufferSize, format, ap);
// old vsnprintf's return -1 if string is truncated new ones return
Expand All @@ -2504,7 +2505,7 @@ static char *SlowFormat(const char *format, va_list ap, int hint)
return nullptr; // int overflow!
}
va_end(ap);
R__VA_COPY(ap, sap);
va_copy(ap, sap);
char *buf = SlowFormat(format, ap, n);
va_end(sap);
va_end(ap);
Expand Down Expand Up @@ -2540,14 +2541,14 @@ static char *Format(const char *format, va_list ap)
buf = gFormbuf;

va_list sap;
R__VA_COPY(sap, ap);
va_copy(sap, ap);

int n = vsnprintf(buf, fld_size, format, ap);
// old vsnprintf's return -1 if string is truncated new ones return
// total number of characters that would have been written
if (n == -1 || n >= fld_size) {
va_end(ap);
R__VA_COPY(ap, sap);
va_copy(ap, sap);
buf = SlowFormat(format, ap, n);
va_end(sap);
va_end(ap);
Expand All @@ -2567,11 +2568,11 @@ static char *Format(const char *format, va_list ap)
/// be overwritten downstream. Use Form() results immediately or use
/// TString::Format() instead.

char *Form(const char *va_(fmt), ...)
char *Form(const char *fmt, ...)
{
va_list ap;
va_start(ap,va_(fmt));
char *b = Format(va_(fmt), ap);
va_start(ap, fmt);
char *b = Format(fmt, ap);
va_end(ap);
return b;
}
Expand All @@ -2581,14 +2582,14 @@ char *Form(const char *va_(fmt), ...)
/// Appends a newline. If gPrintViaErrorHandler is true it will print via the
/// currently active ROOT error handler.

void Printf(const char *va_(fmt), ...)
void Printf(const char *fmt, ...)
{
va_list ap;
va_start(ap,va_(fmt));
va_start(ap, fmt);
if (gPrintViaErrorHandler)
ErrorHandler(kPrint, nullptr, va_(fmt), ap);
ErrorHandler(kPrint, nullptr, fmt, ap);
else {
char *b = Format(va_(fmt), ap);
char *b = Format(fmt, ap);
printf("%s\n", b);
fflush(stdout);
}
Expand Down
Loading
Loading