From 5eb5d2420e36d730c89c23ff00a3a9c2bba3543d Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 8 Sep 2018 08:57:02 +0200 Subject: [PATCH] Make INIT method optional for oplists. --- m-array.h | 2 +- m-list.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/m-array.h b/m-array.h index 62849510..1fe447e8 100644 --- a/m-array.h +++ b/m-array.h @@ -51,7 +51,7 @@ /* FIXME: Do we want to export some methods as they are slow and are not fit to be used for building other methods (like _remove)? */ #define ARRAYI_OPLIST2(name, oplist) \ - (INIT(M_C(name, _init)) \ + (M_IF_METHOD(INIT, oplist)(INIT(M_C(name, _init)),) \ ,INIT_SET(M_C(name, _init_set)) \ ,INIT_WITH(API_1(M_INIT_VAI)) \ ,SET(M_C(name, _set)) \ diff --git a/m-list.h b/m-list.h index bc529238..35e173fa 100644 --- a/m-list.h +++ b/m-list.h @@ -54,7 +54,7 @@ #define LISTI_OPLIST(arg) LISTI_OPLIST2 arg #define LISTI_OPLIST2(name, oplist) \ - (INIT(M_C(name, _init)), \ + (M_IF_METHOD(INIT, oplist)(INIT(M_C(name, _init)),), \ INIT_SET(M_C(name, _init_set)), \ INIT_WITH(API_1(M_INIT_VAI)), \ SET(M_C(name, _set)), \