Skip to content

[core] Replace CINT with CLING #15513

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion bindings/r/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__
Copy link
Member

@pcanal pcanal May 20, 2024

Choose a reason for hiding this comment

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

A more semantically accurate replacement within a LinkDef file is:

Suggested change
#ifdef __CLING__
#ifdef __ROOTCLING__

(i.e. needed only during dictionary generation and not during interpretation)


#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion bindings/tpython/inc/LinkDef.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion core/base/inc/LinkDef1.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion core/base/inc/LinkDef2.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#ifdef __CLING__
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion core/base/inc/LinkDef3.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion core/base/inc/RtypesImp.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ inline void operator delete(void*, ROOT::Internal::TOperatorNewHelper*) { }

// The STL GenerateInitInstance are not unique and hence are declared static
// (not accessible outside the dictionary and not linker error for duplicate)
#if defined(__CINT__)
#if defined(__CLING__)
#define RootStlStreamer(name,STREAMER)
#else
#define RootStlStreamer(name,STREAMER) \
Expand Down
6 changes: 3 additions & 3 deletions core/base/src/TApplication.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1801,12 +1801,12 @@ Longptr_t TApplication::ExecuteFile(const char *file, Int_t *error, Bool_t keep)
while (s && (*s == ' ' || *s == '\t')) s++; // strip-off leading blanks

// very simple minded pre-processor parsing, only works in case macro file
// starts with "#ifndef __CINT__". In that case everything till next
// starts with "#ifndef __CLING__". In that case everything till next
// "#else" or "#endif" will be skipped.
if (*s == '#') {
char *cs = Compress(currentline);
if (strstr(cs, "#ifndef__CINT__") ||
strstr(cs, "#if!defined(__CINT__)"))
Comment on lines -1808 to -1809
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to check here for both, __CINT__ and __CLING__?

if (strstr(cs, "#ifndef__CLING__") ||
strstr(cs, "#if!defined(__CLING__)"))
ifndefc = 1;
else if (ifndefc && (strstr(cs, "#ifdef") || strstr(cs, "#ifndef") ||
strstr(cs, "#ifdefined") || strstr(cs, "#if!defined")))
Expand Down
2 changes: 1 addition & 1 deletion core/base/src/TSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3437,7 +3437,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
linkdefFile << "// File Automatically generated by the ROOT Script Compiler "
<< std::endl;
linkdefFile << std::endl;
linkdefFile << "#ifdef __CINT__" << std::endl;
linkdefFile << "#ifdef __CLING__" << std::endl;
linkdefFile << std::endl;
linkdefFile << "#pragma link C++ nestedclasses;" << std::endl;
linkdefFile << "#pragma link C++ nestedtypedefs;" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion core/clingutils/src/multimap2Linkdef.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// For backward compatibility only
#ifdef __CINT__
#ifdef __CLING__
#include <multimap>
#else
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion core/clingutils/src/multimapLinkdef.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// For backward compatibility only
#ifdef __CINT__
#ifdef __CLING__
#include <multimap>
#else
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion core/clingutils/src/multisetLinkdef.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// For backward compatibility only
#ifdef __CINT__
#ifdef __CLING__
#include <multiset>
#else
#include <set>
Expand Down
2 changes: 1 addition & 1 deletion core/cont/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link C++ global kIterForward;
#pragma link C++ global kIterBackward;
Expand Down
2 changes: 1 addition & 1 deletion core/dictgen/src/rootcling_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ void CallWriteStreamer(const ROOT::TMetaUtils::AnnotatedRecordDecl &cl,
void GenerateLinkdef(llvm::cl::list<std::string> &InputFiles,
std::string &code_for_parser)
{
code_for_parser += "#ifdef __CINT__\n\n";
code_for_parser += "#ifdef __CLING__\n\n";
code_for_parser += "#pragma link off all globals;\n";
code_for_parser += "#pragma link off all classes;\n";
code_for_parser += "#pragma link off all functions;\n\n";
Expand Down
2 changes: 1 addition & 1 deletion core/macosx/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion core/meta/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link C++ nestedtypedefs;
#pragma link C++ nestedclasses;
Expand Down
2 changes: 1 addition & 1 deletion core/rint/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion core/thread/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion core/unix/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion core/winnt/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion geom/gdml/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion geom/geom/inc/LinkDef1.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link C++ global gGeoManager;
#pragma link C++ global gGeoIdentity;
Expand Down
2 changes: 1 addition & 1 deletion geom/geom/inc/LinkDef2.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link C++ class TGeoPatternFinder + ;
#pragma link C++ class TGeoPatternX + ;
Expand Down
2 changes: 1 addition & 1 deletion geom/geombuilder/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion geom/geompainter/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion geom/vecgeom/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion geom/webviewer/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/asimage/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/asimage/inc/LinkDefGui.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/cocoa/inc/LinkDef.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/fitsio/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/gpad/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/gpadv7/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/graf/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/gviz/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/postscript/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/primitivesv7/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/win32gdk/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/x11/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf2d/x11ttf/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf3d/csg/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf3d/eve7/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// LinkDef.h - REve objects and services.
//==============================================================================

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf3d/g3d/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf3d/gl/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "RConfigure.h"

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf3d/gviz3d/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
2 changes: 1 addition & 1 deletion graf3d/x3d/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifdef __CINT__
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
Expand Down
Loading
Loading