]>
git.saurik.com Git - apple/security.git/blob - libsecurity_codesigning/antlr2/src/ASTRefCount.cpp
1 /* ANTLR Translator Generator
2 * Project led by Terence Parr at http://www.jGuru.com
3 * Software rights: http://www.antlr.org/license.html
5 * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/ASTRefCount.cpp#2 $
7 #include "antlr/ASTRefCount.hpp"
8 #include "antlr/AST.hpp"
10 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
14 ASTRef::ASTRef(AST
* p
)
26 ASTRef
* ASTRef::getRef(const AST
* p
)
29 AST
* pp
= const_cast<AST
*>(p
);
31 return pp
->ref
->increment();
33 return new ASTRef(pp
);
38 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE