Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
general
ccb
glpkapi
Commits
d655c200
Commit
d655c200
authored
Sep 13, 2018
by
Mayo Roettger
Browse files
fixed PROTECT bug
parent
de5cfb0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
d655c200
...
...
@@ -2,7 +2,7 @@ Package: glpkAPI
Type: Package
Title: R Interface to C API of GLPK
Version: 1.3.1
Date: 2018-09-
0
3
Date: 2018-09-
1
3
Authors@R: c(person("Mayo", "Roettger", email = "mayo.roettger@hhu.de", role = "cre"),
person("Gabriel", "Gelius-Dietrich", role = "aut", email = "geliudie@uni-duesseldorf.de"),
person("Louis", "Luangkesorn", email = "lugerpitt@gmail.com", role = "ctb" ))
...
...
@@ -13,7 +13,7 @@ SystemRequirements: GLPK (>= 4.42)
License: GPL-3
LazyLoad: yes
Collate: generics.R glpk_ptrClass.R glpk.R glpkAPI.R zzz.R
Packaged: 2018-09-
0
3
08:30
:00 UTC; mayo
Packaged: 2018-09-
1
3
14:05
:00 UTC; mayo
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2018-09-
0
3
08:30
:00
Date/Publication: 2018-09-
1
3
14:05
:00
inst/NEWS.Rd
View file @
d655c200
...
...
@@ -5,8 +5,10 @@
\encoding{UTF-8}
% ---------------------------------------------------------------------------- %
\section{Changes in version 1.3.1 2018-0
8-22
}{
\section{Changes in version 1.3.1 2018-0
9-13
}{
\itemize{
\item{fixed a bug where an allocating function was called with an unprotected
allocated R object in a makro funtion defined in \file{glpkAPI.h}.}
\item{changed package maintainer}
}
}
...
...
src/glpkR.h
View file @
d655c200
...
...
@@ -145,7 +145,7 @@
const int *rm = INTEGER(m); \
const int *rn = INTEGER(n); \
oind = R_Calloc(Rf_asInteger(ne), int); \
R_orderVector(oind, Rf_asInteger(ne), Rf_lang2(m, n), TRUE, FALSE); \
R_orderVector(oind, Rf_asInteger(ne),
PROTECT(
Rf_lang2(m, n)
)
, TRUE, FALSE); \
while (y < Rf_asInteger(ne)) { \
if ( (rm[oind[y-1]] == rm[oind[y]]) && (rn[oind[y-1]] == rn[oind[y]]) ) { \
dupA = oind[y-1]; \
...
...
@@ -158,6 +158,7 @@
if (dupB) { \
Rf_error("Duplicate indices 'ia[%i] = ia[%i] = %i' and 'ja[%i] = ja[%i] = %i' not allowed!", dupA+1, dupB+1, rm[dupA], dupA+1, dupB+1, rn[dupB]); \
} \
UNPROTECT(1)
}
while
(
0
)
#else
#define checkDupIndices(m, n, ne)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment