Skip to content

Commit 0faab78

Browse files
printing debugging information
1 parent 715a4db commit 0faab78

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

inst/include/Rcpp/api/meat/wrap.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ namespace internal{
2727

2828
template <typename InputIterator, typename KEY, typename VALUE, int RTYPE>
2929
inline SEXP range_wrap_dispatch___impl__pair( InputIterator first, InputIterator last, Rcpp::traits::true_type ){
30-
size_t size = std::distance( first, last ) ;
30+
RCPP_DEBUG_3( "range_wrap_dispatch___impl__pair<KEY = %s, VALUE = %s, RTYPE = %d>\n", DEMANGLE(KEY), DEMANGLE(VALUE), RTYPE)
31+
size_t size = std::distance( first, last ) ;
3132
typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
3233

3334
Shield<SEXP> names( Rf_allocVector(STRSXP, size) ) ;

inst/include/Rcpp/internal/wrap.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,8 @@ inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last,
411411
*/
412412
template<typename InputIterator, typename T>
413413
inline SEXP range_wrap_dispatch( InputIterator first, InputIterator last ){
414-
RCPP_DEBUG_2( "range_wrap_dispatch< InputIterator = \n%s , T = %s>\n", DEMANGLE(InputIterator), DEMANGLE(T) ) ;
414+
typedef typename ::Rcpp::traits::r_type_traits<T>::r_category categ ;
415+
RCPP_DEBUG_3( "range_wrap_dispatch< InputIterator = \n%s , T = %s, categ = %s>\n", DEMANGLE(InputIterator), DEMANGLE(T), DEMANGLE(categ) ) ;
415416
return range_wrap_dispatch___impl<InputIterator,T>( first, last, typename ::Rcpp::traits::r_type_traits<T>::r_category() ) ;
416417
}
417418

inst/unitTests/cpp/wrap.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// You should have received a copy of the GNU General Public License
2020
// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
2121

22+
#define RCPP_DEBUG_LEVEL 1
23+
2224
#include <Rcpp.h>
2325
using namespace Rcpp ;
2426

0 commit comments

Comments
 (0)