Changeset 1385 in svn for trunk/util/xc_stack.c


Ignore:
Timestamp:
2013-09-22T16:17:46Z (2 years ago)
Author:
Xuefer
Message:

readonly protection for copied array

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/util/xc_stack.c

    r990 r1385  
    2828void* xc_stack_pop(S stack)
    2929{
    30     assert(stack != NULL && stack->size > 0);
     30    assert(stack != NULL);
     31    assert(stack->size > 0);
    3132    return stack->data[--stack->cnt];
    3233}
     
    3435void* xc_stack_top(S stack)
    3536{
    36     assert(stack != NULL && stack->cnt > 0);
     37    assert(stack != NULL);
     38    assert(stack->cnt > 0);
    3739    return stack->data[stack->cnt-1];
    3840}
     
    4042void* xc_stack_get(S stack, int n)
    4143{
    42     assert(stack != NULL && stack->cnt > 0);
     44    assert(stack != NULL);
     45    assert(stack->cnt > 0);
    4346    return stack->data[n];
    4447}
Note: See TracChangeset for help on using the changeset viewer.