R tidy up removing C++ comments

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12853 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-11-30 20:09:46 +00:00
commit ff8ba43ff6
3 changed files with 9 additions and 13 deletions

View file

@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.5 (in progress) Version 2.0.5 (in progress)
=========================== ===========================
2011-11-30: wsfulton
[R] Remove C++ comments from generated C code.
2011-11-27: olly 2011-11-27: olly
[Python] Fix some warnings when compiling generated wrappers with [Python] Fix some warnings when compiling generated wrappers with
certain GCC warning options (Debian bug #650246). certain GCC warning options (Debian bug #650246).

View file

@ -261,7 +261,6 @@ SWIG_R_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
SEXP rptr = R_MakeExternalPtr(ptr, SEXP rptr = R_MakeExternalPtr(ptr,
R_MakeExternalPtr(type, R_NilValue, R_NilValue), R_NilValue); R_MakeExternalPtr(type, R_NilValue, R_NilValue), R_NilValue);
SET_S4_OBJECT(rptr); SET_S4_OBJECT(rptr);
// rptr = Rf_setAttrib(rptr, R_ClassSymbol, mkChar(SWIG_TypeName(type)));
return rptr; return rptr;
} }

View file

@ -104,10 +104,8 @@ namespace swig {
Type v; Type v;
int res = asval(obj, &v); int res = asval(obj, &v);
if (!obj || !SWIG_IsOK(res)) { if (!obj || !SWIG_IsOK(res)) {
// if (!PyErr_Occurred()) { if (throw_error)
// %type_error(swig::type_name<Type>()); throw std::invalid_argument("bad type");
// }
if (throw_error) throw std::invalid_argument("bad type");
} }
return v; return v;
} }
@ -129,10 +127,8 @@ namespace swig {
} else { } else {
// Uninitialized return value, no Type() constructor required. // Uninitialized return value, no Type() constructor required.
static Type *v_def = (Type*) malloc(sizeof(Type)); static Type *v_def = (Type*) malloc(sizeof(Type));
// if (!PyErr_Occurred()) { if (throw_error)
// %type_error(swig::type_name<Type>()); throw std::invalid_argument("bad type");
// }
if (throw_error) throw std::invalid_argument("bad type");
memset(v_def,0,sizeof(Type)); memset(v_def,0,sizeof(Type));
return *v_def; return *v_def;
} }
@ -147,10 +143,8 @@ namespace swig {
if (SWIG_IsOK(res)) { if (SWIG_IsOK(res)) {
return v; return v;
} else { } else {
// if (!PyErr_Occurred()) { if (throw_error)
// %type_error(swig::type_name<Type>()); throw std::invalid_argument("bad type");
// }
if (throw_error) throw std::invalid_argument("bad type");
return 0; return 0;
} }
} }