| OLD | NEW |
| (Empty) | |
| 1 /* |
| 2 * Copyright 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. |
| 5 */ |
| 6 |
| 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_LIST_H_ |
| 8 #define NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_LIST_H_ |
| 9 |
| 10 #include "native_client/src/include/nacl_base.h" |
| 11 #include "native_client/src/include/portability.h" |
| 12 |
| 13 #include "native_client/src/trusted/generic_container/container.h" |
| 14 |
| 15 EXTERN_C_BEGIN |
| 16 |
| 17 struct NaClItemList { |
| 18 struct NaClItemList *next; |
| 19 void *datum; /* dynamically allocated, pod */ |
| 20 }; |
| 21 |
| 22 struct NaClContainerList { |
| 23 struct NaClContainer base; |
| 24 struct NaClCmpFunctor *cmp_functor; |
| 25 struct NaClItemList *head; |
| 26 }; |
| 27 |
| 28 int NaClContainerListCtor(struct NaClContainerList *clp, |
| 29 struct NaClCmpFunctor *cmp_functor); |
| 30 |
| 31 int NaClContainerListInsert(struct NaClContainer *base_pointer, |
| 32 void *obj); |
| 33 |
| 34 struct NaClContainerIter *NaClContainerListFind( |
| 35 struct NaClContainer *base_pointer, |
| 36 void *key, |
| 37 struct NaClContainerIter *out); |
| 38 |
| 39 void NaClContainerListDtor(struct NaClContainer *vself); |
| 40 |
| 41 struct NaClContainerListIter { |
| 42 struct NaClContainerIter base; |
| 43 struct NaClItemList **cur; |
| 44 }; |
| 45 |
| 46 int NaClContainerListIterCtor(struct NaClContainer *vself, |
| 47 struct NaClContainerIter *viter); |
| 48 |
| 49 EXTERN_C_END |
| 50 |
| 51 #endif /* NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_LIST_H_ */ |
| OLD | NEW |