mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
Fix the defunct test for the standard structure types in cifframe_type.
The failure to detect those types was causing a substantial space leak in some gui applications. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30093 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
50958c665e
commit
80632b32c7
2 changed files with 17 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2010-04-06 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Source/cifframe.m (cifframe_type): Fix the defunct test for the
|
||||||
|
standard structure types. The failure to detect those types was
|
||||||
|
causing a substantial space leak in some gui applications.
|
||||||
|
|
||||||
2010-03-29 Richard Frith-Macdonald <rfm@gnu.org>
|
2010-03-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* config/config.ffi.c: add test for libffi functionality
|
* config/config.ffi.c: add test for libffi functionality
|
||||||
|
|
|
@ -340,8 +340,13 @@ cifframe_type(const char *typePtr, const char **advance)
|
||||||
unsigned align = __alignof(double);
|
unsigned align = __alignof(double);
|
||||||
|
|
||||||
/* Standard structures can be handled using cached type information.
|
/* Standard structures can be handled using cached type information.
|
||||||
|
Since the switch statement has already skipped the _C_STRUCT_B
|
||||||
|
character, we must use typePtr-1 below to successfully match the
|
||||||
|
type encoding with one of the standard type encodings. The same
|
||||||
|
holds for skipping past the whole structure type's encoding with
|
||||||
|
objc_skip_typespec.
|
||||||
*/
|
*/
|
||||||
if (GSSelectorTypesMatch(typePtr, @encode(NSRange)))
|
if (GSSelectorTypesMatch(typePtr - 1, @encode(NSRange)))
|
||||||
{
|
{
|
||||||
static ffi_type *elems[3];
|
static ffi_type *elems[3];
|
||||||
static ffi_type stype = { 0 };
|
static ffi_type stype = { 0 };
|
||||||
|
@ -368,10 +373,10 @@ cifframe_type(const char *typePtr, const char **advance)
|
||||||
stype.type = FFI_TYPE_STRUCT;
|
stype.type = FFI_TYPE_STRUCT;
|
||||||
}
|
}
|
||||||
ftype = &stype;
|
ftype = &stype;
|
||||||
typePtr = objc_skip_typespec (typePtr);
|
typePtr = objc_skip_typespec (typePtr - 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (GSSelectorTypesMatch(typePtr, @encode(NSSize)))
|
else if (GSSelectorTypesMatch(typePtr - 1, @encode(NSSize)))
|
||||||
{
|
{
|
||||||
static ffi_type *elems[3];
|
static ffi_type *elems[3];
|
||||||
static ffi_type stype = { 0 };
|
static ffi_type stype = { 0 };
|
||||||
|
@ -392,10 +397,10 @@ cifframe_type(const char *typePtr, const char **advance)
|
||||||
stype.type = FFI_TYPE_STRUCT;
|
stype.type = FFI_TYPE_STRUCT;
|
||||||
}
|
}
|
||||||
ftype = &stype;
|
ftype = &stype;
|
||||||
typePtr = objc_skip_typespec (typePtr);
|
typePtr = objc_skip_typespec (typePtr - 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (GSSelectorTypesMatch(typePtr, @encode(NSRect)))
|
else if (GSSelectorTypesMatch(typePtr - 1, @encode(NSRect)))
|
||||||
{
|
{
|
||||||
static ffi_type *elems[3];
|
static ffi_type *elems[3];
|
||||||
static ffi_type stype = { 0 };
|
static ffi_type stype = { 0 };
|
||||||
|
@ -412,7 +417,7 @@ cifframe_type(const char *typePtr, const char **advance)
|
||||||
stype.type = FFI_TYPE_STRUCT;
|
stype.type = FFI_TYPE_STRUCT;
|
||||||
}
|
}
|
||||||
ftype = &stype;
|
ftype = &stype;
|
||||||
typePtr = objc_skip_typespec (typePtr);
|
typePtr = objc_skip_typespec (typePtr - 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue