From b5544a181276a3d258cea6deaa6ff875d1e580fc Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Fri, 25 Feb 2022 17:02:48 +1300 Subject: [PATCH] Remove commented out redundant code This was an alternate version without NULL checks on free() and delete, but we removed those checks globally in 7ec2f89fe241e3aabd988d3aa6fe17e4878516dc so now it's just the same as the active code. --- Lib/lua/typemaps.i | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Lib/lua/typemaps.i b/Lib/lua/typemaps.i index a930b038f..0715e0cea 100644 --- a/Lib/lua/typemaps.i +++ b/Lib/lua/typemaps.i @@ -188,16 +188,6 @@ int SWIG_read_NAME_num_array(lua_State* L,int index,TYPE *array,int size); */ -/* Reported that you don't need to check for NULL for delete & free -There probably is some compiler that its not true for, so the code is left here just in case. -#ifdef __cplusplus -#define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN] -#define SWIG_FREE_ARRAY(PTR) delete[] PTR -#else -#define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE)) -#define SWIG_FREE_ARRAY(PTR) free(PTR) -#endif -*/ %{ #ifdef __cplusplus /* generic alloc/dealloc fns*/ #define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN]