PengZheng commented on code in PR #518: URL: https://github.com/apache/celix/pull/518#discussion_r1161698362
########## libs/error_injector/celix_array_list/src/celix_array_list_ei.cc: ########## @@ -0,0 +1,101 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#include "celix_array_list_ei.h" + +extern "C" { + +void *__real_celix_arrayList_create(void); +CELIX_EI_DEFINE(celix_arrayList_create, celix_array_list_t*) +void *__wrap_celix_arrayList_create(void) { + CELIX_EI_IMPL(celix_arrayList_create); + return __real_celix_arrayList_create(); +} + +void *__real_celix_arrayList_createWithOptions(const celix_array_list_create_options_t* opts); +CELIX_EI_DEFINE(celix_arrayList_createWithOptions, celix_array_list_t*) +void *__wrap_celix_arrayList_createWithOptions(const celix_array_list_create_options_t* opts) { + CELIX_EI_IMPL(celix_arrayList_createWithOptions); + return __real_celix_arrayList_createWithOptions(opts); +} + +celix_status_t __real_celix_arrayList_add(celix_array_list_t* list, void* value); +CELIX_EI_DEFINE(celix_arrayList_add, celix_status_t) +celix_status_t __wrap_celix_arrayList_add(celix_array_list_t* list, void* value) { + CELIX_EI_IMPL_POSITIVE(celix_arrayList_add); Review Comment: `CELIX_EI_IMPL` should be enough for all cases. @xuzhenbao introduces `CELIX_EI_IMPL_POSITIVE` and `CELIX_EI_IMPL_NEGATIVE` by accident. Zhenbao, please remove them from error_injector api. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org