Skip to content

Commit

Permalink
Fix unprotected arguments
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 19, 2017
1 parent a791584 commit 4d518a5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/git2r_blob.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 @@ -207,11 +207,13 @@ void git2r_blob_init(const git_blob *source, SEXP repo, SEXP dest)
{
const git_oid *oid;
char sha[GIT_OID_HEXSZ + 1];
SEXP s_sha = Rf_install("sha");
SEXP s_repo = Rf_install("repo");

oid = git_blob_id(source);
git_oid_tostr(sha, sizeof(sha), oid);
SET_SLOT(dest, Rf_install("sha"), mkString(sha));
SET_SLOT(dest, Rf_install("repo"), repo);
SET_SLOT(dest, s_sha, mkString(sha));
SET_SLOT(dest, s_repo, repo);
}

/**
Expand Down

0 comments on commit 4d518a5

Please sign in to comment.