File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -153,8 +153,8 @@ static SEXP nano_inHook(SEXP x, SEXP fun) {
153153 PROTECT (list = Rf_xlengthgets (nano_refList , xlen + 1 ));
154154 SET_VECTOR_ELT (list , xlen , x );
155155 }
156- char idx [NANONEXT_INT_STRLEN ];
157- snprintf (idx , NANONEXT_INT_STRLEN , "%d " , (int ) xlen + 1 );
156+ char idx [NANONEXT_LD_STRLEN ];
157+ snprintf (idx , NANONEXT_LD_STRLEN , "%ld " , (long int ) xlen + 1 );
158158 PROTECT (out = Rf_mkChar (idx ));
159159 if (xlen == 0 ) {
160160 PROTECT (names = Rf_ScalarString (out ));
@@ -173,7 +173,7 @@ static SEXP nano_inHook(SEXP x, SEXP fun) {
173173
174174static SEXP nano_outHook (SEXP x , SEXP fun ) {
175175
176- const int i = atoi (CHAR (STRING_ELT (x , 0 ))) - 1 ;
176+ const long int i = atol (CHAR (STRING_ELT (x , 0 ))) - 1 ;
177177
178178 return VECTOR_ELT (fun , i );
179179
Original file line number Diff line number Diff line change @@ -127,9 +127,9 @@ typedef struct nano_cv_s {
127127
128128#define ERROR_OUT (xc ) Rf_error("%d | %s", xc, nng_strerror(xc))
129129#define ERROR_RET (xc ) { Rf_warning("%d | %s", xc, nng_strerror(xc)); return mk_error(xc); }
130- #define NANONEXT_INIT_BUFSIZE 16384
130+ #define NANONEXT_INIT_BUFSIZE 8192
131131#define NANONEXT_SERIAL_VER 3
132- #define NANONEXT_INT_STRLEN 12
132+ #define NANONEXT_LD_STRLEN 21
133133#define NANO_ALLOC (x , sz ) \
134134 (x)->buf = R_Calloc(sz, unsigned char); \
135135 (x)->len = sz; \
You can’t perform that action at this time.
0 commit comments