Skip to content

Commit eedb6f2

Browse files
committed
Fix the potential issue of UNPROTECT_PTR
1 parent 61b6f12 commit eedb6f2

4 files changed

Lines changed: 12 additions & 11 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: Corbi
2-
Version: 0.4-2
2+
Version: 0.4-3
33
Title: Collection of Rudimentary Bioinformatics Tools
44
Description: Provides a bundle of basic and fundamental bioinformatics tools,
55
such as network querying and alignment, subnetwork extraction and search,
@@ -16,4 +16,4 @@ VignetteBuilder: knitr
1616
License: GPL (>= 2)
1717
BugReports: https://github.com/wulingyun/Corbi/issues
1818
URL: https://github.com/wulingyun/Corbi
19-
RoxygenNote: 6.0.1
19+
RoxygenNote: 6.1.1

man/net_align.Rd

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/net_query.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/misc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void SetListElement(SEXP list, int i, const char *tag, SEXP value)
2424
PROTECT(_names = NEW_STRING(length(list)));
2525
SET_STRING_ELT(_names, i, mkChar(tag));
2626
setAttrib(list, R_NamesSymbol, _names);
27-
UNPROTECT_PTR(_names);
27+
UNPROTECT(1);
2828
}
2929
else
3030
SET_STRING_ELT(_names, i, mkChar(tag));
@@ -40,7 +40,7 @@ void SetDim2(SEXP array, int x1, int x2)
4040
INTEGER_POINTER(_dim)[0] = x1;
4141
INTEGER_POINTER(_dim)[1] = x2;
4242
SET_DIM(array, _dim);
43-
UNPROTECT_PTR(_dim);
43+
UNPROTECT(1);
4444
}
4545

4646
void SetDim3(SEXP array, int x1, int x2, int x3)
@@ -51,7 +51,7 @@ void SetDim3(SEXP array, int x1, int x2, int x3)
5151
INTEGER_POINTER(_dim)[1] = x2;
5252
INTEGER_POINTER(_dim)[2] = x3;
5353
SET_DIM(array, _dim);
54-
UNPROTECT_PTR(_dim);
54+
UNPROTECT(1);
5555
}
5656

5757
void SetDim4(SEXP array, int x1, int x2, int x3, int x4)
@@ -63,7 +63,7 @@ void SetDim4(SEXP array, int x1, int x2, int x3, int x4)
6363
INTEGER_POINTER(_dim)[2] = x3;
6464
INTEGER_POINTER(_dim)[3] = x4;
6565
SET_DIM(array, _dim);
66-
UNPROTECT_PTR(_dim);
66+
UNPROTECT(1);
6767
}
6868

6969
/* sampling method */

0 commit comments

Comments
 (0)