mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
update method types macro
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27935 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dffa844f2b
commit
18d114ec9a
1 changed files with 14 additions and 12 deletions
|
@ -19,11 +19,15 @@
|
|||
|
||||
#define MFRAME_ARGS int
|
||||
|
||||
/*
|
||||
#define MFRAME_INIT_ARGS(CUM, RTYPE) \
|
||||
((CUM) = ((*(RTYPE)==_C_STRUCT_B || *(RTYPE)==_C_UNION_B || \
|
||||
*(RTYPE)==_C_ARY_B) && \
|
||||
objc_sizeof_type(RTYPE) > MFRAME_SMALL_STRUCT) \
|
||||
? sizeof(void*) : 0)
|
||||
*/
|
||||
|
||||
#define MFRAME_INIT_ARGS(CUM, RTYPE) ((CUM) = 0)
|
||||
|
||||
#define MFRAME_ARG_ENCODING(CUM, TYPE, STACK, DEST) \
|
||||
({ \
|
||||
|
@ -31,17 +35,11 @@
|
|||
int align = objc_alignof_type(type); \
|
||||
int size = objc_sizeof_type(type); \
|
||||
\
|
||||
(CUM) = ROUND((CUM), align); \
|
||||
(TYPE) = objc_skip_typespec(type); \
|
||||
sprintf((DEST), "%.*s%d", (int)((TYPE)-type), type, (CUM)); \
|
||||
if (*(TYPE) == '+') \
|
||||
{ \
|
||||
(TYPE)++; \
|
||||
} \
|
||||
if (*(TYPE) == '-') \
|
||||
{ \
|
||||
(TYPE)++; \
|
||||
} \
|
||||
(CUM) = ROUND((CUM), __alignof__(int)); \
|
||||
sprintf((DEST), "%.*s%d", (TYPE)-type, type, (CUM)); \
|
||||
if (*(TYPE) == '+') (TYPE)++; \
|
||||
if (*(TYPE) == '-') (TYPE)++; \
|
||||
while (isdigit(*(TYPE))) \
|
||||
{ \
|
||||
(TYPE)++; \
|
||||
|
@ -53,8 +51,12 @@
|
|||
} \
|
||||
else \
|
||||
{ \
|
||||
if (size < sizeof(int)) \
|
||||
{ \
|
||||
size = sizeof(int); \
|
||||
} \
|
||||
(STACK) = (CUM) + size; \
|
||||
} \
|
||||
(CUM) += ROUND(size, sizeof(void*)); \
|
||||
(CUM) += size; \
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue