22 this->
ints = malloc((
unsigned long)
sizeof(
unsigned int) * this->length);
24 if (0 == this->
ints) {
51 if (content < this->
length && (content <= this->
next || this->
next == 0)) {
53 if (this->
next == UINT_MAX) {
79 if (path >= this->
length || path >= this->
next) {
84 if (content >= this->
length || content >= this->
next) {
89 this->
ints[path] = content;
94 if (path >= this->
length || path >= this->
next) {
99 return this->
ints[path];
unsigned int Inventory_read(const struct Inventory *this, unsigned int path, int *error)
void Inventory_update(struct Inventory *this, unsigned int path, unsigned int content, int *error)
struct Inventory * Inventory_construct(unsigned int length, int *error)
unsigned int Inventory_getNext(const struct Inventory *this)
struct Inventory * Inventory_destruct(struct Inventory *this)
void Inventory_append(struct Inventory *this, unsigned int content, int *error)
void Inventory_appendUnchecked(struct Inventory *this, unsigned int content, int *error)
#define ERROR_INVENTORY_CONTENT_OUT_OF_BOUNDS
#define ERROR_INVENTORY_PATH_OUT_OF_BOUNDS