Skip to content

Commit

Permalink
Fix missing PROTECT
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
  • Loading branch information
stewid committed Apr 17, 2017
1 parent 0040026 commit 688c57c
Showing 1 changed file with 16 additions and 28 deletions.
44 changes: 16 additions & 28 deletions src/git2r_transfer.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* git2r, R bindings to the libgit2 library.
* Copyright (C) 2013-2015 The git2r contributors
* Copyright (C) 2013-2017 The git2r contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2,
Expand Down Expand Up @@ -30,31 +30,19 @@ void git2r_transfer_progress_init(
const git_transfer_progress *source,
SEXP dest)
{
SET_SLOT(dest,
Rf_install("total_objects"),
ScalarInteger(source->total_objects));

SET_SLOT(dest,
Rf_install("indexed_objects"),
ScalarInteger(source->indexed_objects));

SET_SLOT(dest,
Rf_install("received_objects"),
ScalarInteger(source->received_objects));

SET_SLOT(dest,
Rf_install("local_objects"),
ScalarInteger(source->local_objects));

SET_SLOT(dest,
Rf_install("total_deltas"),
ScalarInteger(source->total_deltas));

SET_SLOT(dest,
Rf_install("indexed_deltas"),
ScalarInteger(source->indexed_deltas));

SET_SLOT(dest,
Rf_install("received_bytes"),
ScalarInteger(source->received_bytes));
SEXP s_total_objects = Rf_install("total_objects");
SEXP s_indexed_objects = Rf_install("indexed_objects");
SEXP s_received_objects = Rf_install("received_objects");
SEXP s_local_objects = Rf_install("local_objects");
SEXP s_total_deltas = Rf_install("total_deltas");
SEXP s_indexed_deltas = Rf_install("indexed_deltas");
SEXP s_received_bytes = Rf_install("received_bytes");

SET_SLOT(dest, s_total_objects, ScalarInteger(source->total_objects));
SET_SLOT(dest, s_indexed_objects, ScalarInteger(source->indexed_objects));
SET_SLOT(dest, s_received_objects, ScalarInteger(source->received_objects));
SET_SLOT(dest, s_local_objects, ScalarInteger(source->local_objects));
SET_SLOT(dest, s_total_deltas, ScalarInteger(source->total_deltas));
SET_SLOT(dest, s_indexed_deltas, ScalarInteger(source->indexed_deltas));
SET_SLOT(dest, s_received_bytes, ScalarInteger(source->received_bytes));
}

0 comments on commit 688c57c

Please sign in to comment.