Mercurial > pub > dyncall > dyncall
comparison dyncall/dyncall_callvm_sparc.c @ 163:ddcf2e49654c
- tiny compatibility fix with < c99 compilers
author | cslag |
---|---|
date | Sun, 01 Jan 2017 23:26:39 +0100 |
parents | 67961454902b |
children | f5577f6bf97a |
comparison
equal
deleted
inserted
replaced
162:3717d475e100 | 163:ddcf2e49654c |
---|---|
147 } | 147 } |
148 | 148 |
149 /* Public API. */ | 149 /* Public API. */ |
150 DCCallVM* dcNewCallVM(DCsize size) | 150 DCCallVM* dcNewCallVM(DCsize size) |
151 { | 151 { |
152 DCCallVM_sparc* p; | |
153 | |
152 /* the six output registers %o0-%o5 are always loaded, thus we need to ensure the argument buffer has space for at least 24 bytes. */ | 154 /* the six output registers %o0-%o5 are always loaded, thus we need to ensure the argument buffer has space for at least 24 bytes. */ |
153 size = DC_MAX(size, sizeof(void*)*(6+1)); | 155 size = DC_MAX(size, sizeof(void*)*(6+1)); |
154 DCCallVM_sparc* p = (DCCallVM_sparc*)dcAllocMem(sizeof(DCCallVM_sparc)+size); | 156 p = (DCCallVM_sparc*)dcAllocMem(sizeof(DCCallVM_sparc)+size); |
155 | 157 |
156 dc_callvm_mode_sparc((DCCallVM*)p, DC_CALL_C_DEFAULT); | 158 dc_callvm_mode_sparc((DCCallVM*)p, DC_CALL_C_DEFAULT); |
157 | 159 |
158 dcVecInit(&p->mVecHead, size); | 160 dcVecInit(&p->mVecHead, size); |
159 | 161 |