|
@@ -18,7 +18,7 @@ extern "C" {
|
18
|
18
|
|
19
|
19
|
extern cmStackH_t cmStackNullHandle;
|
20
|
20
|
|
21
|
|
- // Allocate a stack to hold fixed data elements of size 'eleByteCnt'.
|
|
21
|
+ // Allocate a stack to hold data elements each of size 'eleByteCnt'.
|
22
|
22
|
// The stack will be initialized with 'initCnt' empty slots. Once these
|
23
|
23
|
// slots are filled 'expandCnt' additional slots will be added as necessary.
|
24
|
24
|
cmStRC_t cmStackAlloc( cmCtx_t* ctx, cmStackH_t* hp, unsigned initCnt, unsigned expandCnt, unsigned eleByteCnt );
|
|
@@ -37,6 +37,10 @@ extern "C" {
|
37
|
37
|
// Remove 'eleCnt' elements from the stack.
|
38
|
38
|
cmStRC_t cmStackPop( cmStackH_t h, unsigned eleCnt );
|
39
|
39
|
|
|
40
|
+ // Return a pointer to the top element on the stack. This is the one which will be
|
|
41
|
+ // lost with the next call to cmStackPop(h,1).
|
|
42
|
+ const void* cmStackTop( cmStackH_t h );
|
|
43
|
+
|
40
|
44
|
// Set the value of 'dataEleCnt' elements on the stack.
|
41
|
45
|
cmStRC_t cmStackSet( cmStackH_t h, unsigned index, const void* data, unsigned dataEleCnt );
|
42
|
46
|
|